Author |
Topic: LB Booster version 1.80 released (Read 748 times) |
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
LB Booster version 1.80 released
« Thread started on: Feb 24th, 2012, 4:10pm » |
|
I've updated LB Booster to version 1.80:
http://www.lbbooster.com/LBB.exe (IDE/compiler) http://www.lbbooster.com/LBBRUN.exe (runtime engine)
Changes in this version are as follows:
Partial support for Unicode has been added. Foreign-alphabet literal strings may be included in a program, and they will print correctly in the mainwin and when sent to the printer with LPRINT. In conjunction with a little API code, GUI controls (except TEXTBOX and TEXTEDITOR controls) can also display Unicode text.
Sprite 'masks' are now linear, allowing sprites to be partially-transparent or to have anti-aliased edges; this makes Anatoly's 'slide rule' program work correctly. This is a very valuable feature which LB4 has too, but it's not documented!
The SPRITECOLLIDES command works correctly even if one or both sprites has been scaled (SPRITESCALE), offset (SPRITEOFFSET) or centered (CENTERSPRITE). This does *not* work correctly in LB4.
The nine most recently opened programs are included in the File menu, for the convenience of being re-loaded without having to navigate to them in a file selector. Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: LB Booster version 1.80 released
« Reply #1 on: Feb 25th, 2012, 1:51pm » |
|
on Feb 24th, 2012, 4:10pm, Richard Russell wrote:Partial support for Unicode has been added. |
|
I should perhaps have emphasised that this feature needs to be enabled in the Options menu, otherwise ANSI operation is assumed. This is because you may have a choice of which to use; for example if you want to output French text with accented characters you can choose to use either ANSI encoding or Unicode encoding for those characters.
Here's a program which outputs some Cyrillic text to the mainwin:
Code:print "Это демонстрация российского текста" Here the text is sent to the printer:
Code:printerdialog
if PrinterName$ = "" then end
PrinterFont$ = "Times_New_Roman 24"
lprint "Это демонстрация российского текста"
dump In the case of a GUI control it is rather more complicated:
Code: global CP.UTF8
CP.UTF8 = hexdec("FDE9")
nomainwin
statictext #w.s1, "", 10, 10, 300, 100
open "Unicode test" for window as #w
#w "trapclose [quit]"
#w "font Times_New_Roman 20"
hws1 = hwnd(#w.s1)
call SetTextUnicode hws1, "Это демонстрация российского текста"
wait
[quit]
close #w
end
sub SetTextUnicode hwin, utf8$
slen = len(utf8$)
calldll #kernel32, "MultiByteToWideChar", _
CP.UTF8 as long, 0 as long, _
utf8$ as ptr, slen as long, _
0 as long, 0 as long, ret as long
wide$ = space$(2*ret)
calldll #kernel32, "MultiByteToWideChar", _
CP.UTF8 as long, 0 as long, _
utf8$ as ptr, slen as long, _
wide$ as ptr, ret as long, ret as long
wide$ = wide$ + chr$(0) + chr$(0)
calldll #user32, "SendMessageW", _
hwin as long, _WM_SETTEXT as long, _
0 as long, wide$ as ptr, ret as long
end sub Richard.
|
|
Logged
|
|
|
|
|