Home » Developing U++ » UppHub » LED Ctrl (for characters and numbers)
|
|
|
|
Re: LED Ctrl (for characters and numbers) [message #27755 is a reply to message #27727] |
Sun, 01 August 2010 23:18 |
|
koldo
Messages: 3398 Registered: August 2008
|
Senior Veteran |
|
|
Hello cb31_fr
It is now added in Bazaar.
I have done some changes relating with this:
Before
MyLED = new LEDCtrl( "<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%", 3, White, Blue ) ;
MyLED->SetBgColor( LtBlue ) ;
After
MyLED.SetString("<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%")
.SetLEDSize(3).SetFgLightOnColor(White).SetFgLightOffColor(Blue).SetBgColor(LtBlue);
I have removed the "new" in code. The U++ coding style is protective so recommends not to use new or malloc. Because of it it is not possible to initialize a Ctrl in the constructor, so I have added some functions to do it after.
The advantage of it is that you will not see heap leaks.
Please check the code. The changes have been light so the order of function calls could change the result.
Thank you very much . Please improve it as many times as you like.
Included in Bazaar table too here http://www.ultimatepp.org/www$uppweb$bazaar$en-us.html (on Monday).
Best regards
Iñaki
[Updated on: Sun, 01 August 2010 23:26] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Nov 01 00:22:32 CET 2024
Total time taken to generate the page: 0.03201 seconds
|