PDA

View Full Version : console+menu-try1a :)



Lionheart008
20-03-2009, 22:05
hey, dear thinbasic friends, I am back from school:)... was very, very stressy... more to this chapter (test training for game design) another day...;)

have done a little console script and following with a little menu popup window... as this example isn't ready I have saved it as an obfuscate script...

by the way: what is 'accelapi'??? :?

good evening, ciao and servus, Lionheart full of new learning stuff... uargh... :lol:

ps: perhaps somebody can check this script if it's run clear, my notebook has it's own character and strikes from time to time...

ErosOlmi
23-03-2009, 18:19
Ok, script is working, it makes many tests but ... impossible to give you more info because script is obfuscated :twisted: ;)

Lionheart008
23-03-2009, 21:56
hi eros:) see my last post, I have added it... but haven't time to make more than this first try until today...

this script I will develop further:)...

have a nice evening, ciao, Lionheart

Petr Schreiber
23-03-2009, 22:14
Hi Frank,

worked on my PC too.

One thing regarding callback hygiene :lol::


case %ID_OK1
CONTROL GET TEXT cbhndl, %ID_TEXT1 TO UserName1
if UserName1 = "" then
msgbox cbhndl, "Sorry, Woolverine, I know your real name! ", %MB_ICONEXCLAMATION
else
msgbox cbhndl, "Hello dear X-Men Member: " & UserName1
end if


... your code above will react to any notification message coming to button. That is not only click, but also disabling, loosing/getting focus.

To make sure you react on clicking only, better to use following:


case %ID_OK1
IF CBCTLMSG = %BN_CLICKED THEN
CONTROL GET TEXT cbhndl, %ID_TEXT1 TO UserName1
if UserName1 = "" then
msgbox cbhndl, "Sorry, Woolverine, I know your real name! ", %MB_ICONEXCLAMATION
else
msgbox cbhndl, "Hello dear X-Men Member: " & UserName1
end if
END IF



Petr

P.S. Happy game design lessons, I am curious about more details when you'll have time