Jump to content

Recommended Posts

Posted

I have a concern about the command to check if a window is closed. What happens is that after pressing the close button, it always returns true, I would expect it to automatically return false, after being pressed. This has me in trouble with the exit management of the program through a menu where it should show a dialog box that is activated from an exit menu button and the title bar on the close button.

 

 

 

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Posted

Use the events system to detect a WINDOWCLOSE event if you need more advanced event handling.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
5 hours ago, Josh said:

Use the events system to detect a WINDOWCLOSE event if you need more advanced event handling.

Hello, is there any documentation on what you are telling me?

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

  • 2 weeks later...
Posted
while (PeekEvent())

{

auto = WaitEvent();

if (e.id = EVENT_WINDOWCLOSE) Print("CLOSE!");

}

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
On 9/19/2021 at 12:58 AM, Josh said:

while (PeekEvent())

{

auto = WaitEvent();

if (e.id = EVENT_WINDOWCLOSE) Print("CLOSE!");

}

 

One question, that only works in C++, I'm in lua, and I can't find the equivalent for the window close event.

 

while EventQueue:Peek() do
					local event = EventQueue:Wait()
					
					
					if event.id == Event.WindowClose then
		
							System:Print("CLOSE TEST")

....

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Posted
while EventQueue:Peek() do
					local event = EventQueue:Wait()
					
				
					if event.id == Event.WindowClose then
		
							System:Print("CLOSE TEST")


					elseif event.id == Event.WidgetAction then

						if event.source == self.btnStart then 
							self.Gui:Hide()
							self.button = self.START
						
				
							
						end
						if event.source == self.btnOptions then
							
							self.pnlOptions:Show()
							self.pnlStart:Hide()

						elseif event.source == self.btnExit then 
							self.pnlStart:Hide()
							self.pnlBox:Show()
					

						elseif event.source == self.btnNot then 
							self.pnlBox:Hide()
							self.pnlStart:Show()
						
						elseif event.source == self.btnYes then
							self.pnlBox:Hide()
							self.button = self.YES
					
						elseif event.source == self.btnSave then
							self:SaveConfig()

						elseif event.source == self.btnCancel then 
							self.pnlOptions:Hide()
							self.pnlStart:Show()

							self:CancelConfig()
					
						end
						
					elseif event.id == Event.WidgetSelect then
						
				
					end 
					
				end

 

 

 

Astrocuco.thumb.png.c76e0fb3de2d6e437e7dca099625e11e.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...