LB Booster
« LB Booster version 1.80 released »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:13am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: LB Booster version 1.80 released  (Read 749 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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:

  1. 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.

  2. 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!

  3. 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.

  4. 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.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls