|
Post by Gordon Rahman on Jun 8, 2020 16:29:43 GMT -5
I needed a dialog_modal window.
This kind of window doesn't allow input from the keyboard, beside the mouse buttons.....
so I had to use a window_popup with a graphic-box to get the arrow-keys from the keyboard.
But then I had to place my own EXIT button.
To be honest ... I liked my solution. Now the gamer can't move or resize the screen.
Where I position my popup-window it stays ....
WindowWidth = 400 WindowHeight = 400 graphicbox #w.g, 0,0,400,400 button #w.b, " X ",[quit],UL,354,3
open "kkkk " for window_popup as #w #w "trapclose [quit]"
#w.g "when leftButtonDown [toets]" #w.g "when characterInput [toets]" #w.g "down; fill blue" #w.g "backcolor green; home; circlefilled 30" #w.g "setfocus"
wait
[toets] notice "dat was keyboard input" wait
[quit] notice "dat was de close trap" close #w end
Gordon
|
|
|
Post by Chris Iverson on Jun 8, 2020 17:33:05 GMT -5
That's not exactly a bug.
That's how dialog windows are designed to operate. They absorb keyboard input to navigate between controls on the dialog window using the arrow keys on the keyboard. This is done by Windows, this isn't an LB thing.
Also, I'm not sure, but I don't think the modal thing actually works. Opening a dialog_modal window doesn't disable other windows in the application.
|
|
|
Post by Gordon Rahman on Jun 8, 2020 18:31:45 GMT -5
That's not exactly a bug. That's how dialog windows are designed to operate. They absorb keyboard input to navigate between controls on the dialog window using the arrow keys on the keyboard. This is done by Windows, this isn't an LB thing. Also, I'm not sure, but I don't think the modal thing actually works. Opening a dialog_modal window doesn't disable other windows in the application. Hello Chris, You're right, it's not a LB bug. But can Carl fix it? Tweak LB? to do it the way I like? Dialog_modal windows seem to be generate by MS. Why did MS left the keyboard events away? Now I have to use the window_popup that even lacks an exit cross (trap-close) Gordon p.s. this is stuf for after LB5. I have lived all this years without it.
|
|
|
Post by Chris Iverson on Jun 8, 2020 18:38:05 GMT -5
Because dialog windows are meant to be simpler windows that are meant for notices and such. LB's built-in NOTICE, PROMPT, and CONFIRM use dialog boxes. You'll notice you can use the keyboard and arrow keys to navigate them. If you want a normal window, you create a normal window.
What exactly are you trying to do with the dialog_modal window that can't be accomplished with window? Especially considering the _modal part seems to not work?
|
|
|
Post by Gordon Rahman on Jun 8, 2020 19:46:34 GMT -5
We are doing a LB workshop. We are programming a game with 8 different playing locations. In some rooms the gamer can use his mouse and in other ones his arrow keys to navigate. You only see 1 location at a time. So the locations should not be movable. In most cases the locations are closed and at every visit all the bmp have to be loaded again. One of this days I'll post a picture. I'm planning to make it a community project here too. Gordon Attachments:
|
|
cundo
Full Member
 
Muchas Gracias!!
Posts: 144
|
Post by cundo on Jun 8, 2020 20:38:21 GMT -5
that looks interesting!
|
|
|
Post by Gordon Rahman on Jun 13, 2020 14:04:34 GMT -5
Thanks. It's a workshop for beginners. Would you join? Gordon I'm in the process of finding out where to advertise a similar kind of project here at the forum.
|
|
cundo
Full Member
 
Muchas Gracias!!
Posts: 144
|
Post by cundo on Jun 13, 2020 14:55:07 GMT -5
Where is it?
|
|
|
Post by Gordon Rahman on Jun 13, 2020 16:11:16 GMT -5
The workshop is in Amsterdam (The Netherlands). I planned to organize a kind of that (project LB for beginners) here. We stopped (covid 19) right now and are keeping in touche via internet. All listings and so on that we produce are on Mediafire. I want to create a special directory there for LB (rest of the world). We speak Dutch. I use a course book written in Dutch. The book (part two) will finish with creating and exploring this game. Gordon
|
|
|
Post by klewlis on Jan 9, 2022 9:53:01 GMT -5
What exactly are you trying to do with the dialog_modal window that can't be accomplished with window? Especially considering the _modal part seems to not work? In case anyone searches dialog_modal like I did, this appears to be fixed. When my program opens a dialog_modal window, I am unable to access the main program window until I dismiss the modal window. You are however able to access other windows not related to your program.
|
|