<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — Mouse Buttons? More then one Window?]]></title>
		<link>https://gprogs.com/viewtopic.php?id=21</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=21&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Mouse Buttons? More then one Window?.]]></description>
		<lastBuildDate>Thu, 12 Jan 2006 06:25:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=63#p63</link>
			<description><![CDATA[<p>But how can i post manually Keystrokes if i dont know there are some.<br />&quot;If EventID()=EVENT_KEYDOWN&quot; never gets true, so how that code would help?</p><br /><p>Maybe that makes it more clear:</p><p>One window: <br />Event_Mousedown and Event_Keydown doesnt work.</p><p>EET_KEY_INPUT_EVENT works.<br />EMIE_LMOUSE_PRESSED_DOWN works.<br />Event_Gadgetaction works.</p><p>Two windows(one with a panel as Irrlicht window, one with a button and a listbox):<br />Event_Mousedown and Event_Keydown doesnt work.<br />EET_KEY_INPUT_EVENT doesnt work.</p><p>EMIE_LMOUSE_PRESSED_DOWN works!!?<br />Event_Gadgetaction works.</p><br /><p>Well, dont want to make you crazy;)</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Thu, 12 Jan 2006 06:25:14 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=63#p63</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=62#p62</link>
			<description><![CDATA[<p>i think the problem is that while a gadget has focus it is capturing events.&nbsp; if you change your Default of your second window to:<br /></p><div class="codebox"><pre><code>If EventID()=EVENT_KEYDOWN
    Local event:T_irrSEvent=T_irrSEvent.create()
    event.setEventType(EET_KEY_INPUT_EVENT)
    event.setKeyInputKey(EventData())
    device.postEventFromUser(event)                
EndIf</code></pre></div><p>this will manually post the keystroke to Irrlicht.&nbsp; you will need a reference to the device on the second window.&nbsp; you can actually call that from anywhere if you change the EventData() to whatever keystroke you want to push.&nbsp; obviously you can push any kind of event also just by changing parameters to the T_irrSEvent methods.</p><p>HTH</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 12 Jan 2006 02:36:41 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=62#p62</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=61#p61</link>
			<description><![CDATA[<p>Its your win32 Example.<br />Irrlicht: Case EKEY_KEY_W</p><br /><p>Method OnEvent:Int(event:T_irrSEvent)<br />If event.getEventType()=EET_Mouse_INPUT_EVENT <br />&nbsp; Local MouseButton:Int=event.getmouseeventtype()<br />&nbsp; Select MouseButton<br />&nbsp; &nbsp; Case EMIE_LMOUSE_PRESSED_DOWN <br />&nbsp; &nbsp; End<br />&nbsp; EndSelect<br />EndIf <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&#039; check If user presses the key &#039;W&#039;<br />If event.getEventType()=EET_KEY_INPUT_EVENT And event.getKeyPressedDown()=False<br />Local key:Int=event.getKeyInputKey()</p><p>Select key<br />&#039; switch wire frame mode<br />Case EKEY_KEY_W&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />box.setMaterialFlag(EMF_WIREFRAME, box.getMaterial(0).getWireframe()=False)<br />Return True&nbsp; &nbsp; <br />EndSelect&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />EndIf<br />Return False<br />EndMethod</p><br /><p>Mouse okay, Key not.<br />Tried if i could get MaxGUI response but fails:</p><p>If PeekEvent() Then <br />&nbsp; &nbsp; &nbsp; &nbsp; PollEvent()<br />&nbsp; &nbsp; &nbsp; &nbsp; Select EventID()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Event_Keydown&nbsp; &nbsp;!!!!!!!!!!!!!!!!!!<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case EVENT_WINDOWCLOSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case EVENT_GADGETACTION&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;If EventSource()=Ok<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;PostEvent(CreateEvent(EVENT_WINDOWCLOSE,testbutton))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;End If<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Default<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PostEvent(CreateEvent(EventID()),True)<br />&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />&nbsp; &nbsp; End If&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <br />Wend</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Thu, 12 Jan 2006 01:11:38 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=61#p61</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=60#p60</link>
			<description><![CDATA[<p>are you checking with EKEY_ constants (Irrlicht) or KEY_ constants (BMAX)?</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 12 Jan 2006 00:53:04 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=60#p60</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=59#p59</link>
			<description><![CDATA[<p>Not sure whats ment with key checking statements.<br />Its the Win32 Example.<br />All I added:<br />Global MG_Win_Editor1:Tgadget=CreateWindow:TGadget(&quot;Editor.. 1&quot;,0,0,112,739,Null,Window_Clientcoords|Window_Titlebar|Window_Resizable|Window_Menu|Window_Hidden)<br />Global MG_Listbox_Entitys:Tgadget=CreateListBox:TGadget(0,0,105,520,MG_Win_Editor1,0)<br />Global Testbutton:Tgadget=CreateButton:TGadget(&quot;mk&quot;,0,680,80,30, MG_Win_Editor1,BUTTON_PUSH)</p><p>The second window contains only MaxGUI Gadgets.</p><p>If PeekEvent() Then <br />&nbsp; &nbsp; &nbsp; &nbsp; PollEvent()<br />&nbsp; &nbsp; &nbsp; &nbsp; Select EventID()<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Case Event_Menuaction <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; If EventData()=MG_Pop_Copy Then exit&nbsp; &nbsp; &nbsp; &nbsp;!!!!!Go ahead, not much to see..<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case EVENT_WINDOWCLOSE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case EVENT_GADGETACTION&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;If EventSource()=Ok<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;PostEvent(CreateEvent(EVENT_WINDOWCLOSE,testbutton))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;End If<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Default<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PostEvent(CreateEvent(EventID()),True)<br />&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />&nbsp; &nbsp; End If&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; <br />Wend</p><p>As soon the mouse enters the panel (irrlicht window) i am able receive mouse button events.<br />But no Key_W..</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Thu, 12 Jan 2006 00:41:03 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=59#p59</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=58#p58</link>
			<description><![CDATA[<p>could you post your event code from your second window?&nbsp; in order to get events to go back to Irrlicht i had to use the PostEvent() function in the loop using the Default clause of the select...&nbsp; so essentially if the checking mechanism doesnt process the event, then it uses PostEvent() to pass it on further.</p><p>another thought, since its not the same window you may have to manually create a T_irrSEvent instance and pass it to the postEventFromUser() method of T_irrIrrlichtDevice.&nbsp; also, could you post your key checking statements from your T_irrEventReceiver?</p><p>thx.</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 12 Jan 2006 00:21:15 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=58#p58</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=57#p57</link>
			<description><![CDATA[<p>Yes. Listbox and Textfield on a other Window are okay.<br />Menu events (called per mouse and keyboard) are okay.</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Thu, 12 Jan 2006 00:11:57 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=57#p57</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=56#p56</link>
			<description><![CDATA[<p>can you type into text boxes and stuff?&nbsp; so its only key events in Irrlicht that arent working?</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Wed, 11 Jan 2006 23:36:49 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=56#p56</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=55#p55</link>
			<description><![CDATA[<p>as for 2)<br />with more then one window opened, MaxGUI Gadgets and MouseButton events work.<br />So &quot;only&quot; a solution for Key_Input must be found..</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Wed, 11 Jan 2006 23:25:40 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=55#p55</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=54#p54</link>
			<description><![CDATA[<p>Aaah, sry, EMI is in your docs, i am blind.<br />Thank you very much.</p><p>A last one:<br />It seems that events in that example only work with Windows created via &quot;Window_Hidden&quot; flag turned on.<br />Just sitting here and wonder how the heck you could know that and why they must be hidden first:)</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Wed, 11 Jan 2006 22:49:48 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=54#p54</guid>
		</item>
		<item>
			<title><![CDATA[Re: Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=53#p53</link>
			<description><![CDATA[<div class="codebox"><pre><code>&#039; ! Left mouse button was pressed down.
Const EMIE_LMOUSE_PRESSED_DOWN = 0

&#039; ! Right mouse button was pressed down.
Const EMIE_RMOUSE_PRESSED_DOWN=1

&#039; ! Middle mouse button was pressed down.
Const EMIE_MMOUSE_PRESSED_DOWN=2

&#039; ! Left mouse button was Left up.
Const EMIE_LMOUSE_LEFT_UP=3

&#039; ! Right mouse button was Left up.
Const EMIE_RMOUSE_LEFT_UP=4

&#039; ! Middle mouse button was Left up.
Const EMIE_MMOUSE_LEFT_UP=5

&#039; ! The mouse cursor changed its position.
Const EMIE_MOUSE_MOVED=6

&#039; ! The mouse wheel was moved. Use Wheel value in event data To find out 
&#039; ! in what direction And how fast.
Const EMIE_MOUSE_WHEEL=7</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Wed, 11 Jan 2006 22:37:54 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=53#p53</guid>
		</item>
		<item>
			<title><![CDATA[Mouse Buttons? More then one Window?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=52#p52</link>
			<description><![CDATA[<p>1)<br />Anyone knows how to get mousebutton events?</p><p>Tried:<br />Method OnEvent:Int(event:T_irrSEvent)</p><p>If event.getEventType()=EET_Mouse_INPUT_EVENT <br />&nbsp; &nbsp;Local MouseButton:Int=event.getmouseeventtype()<br />&nbsp; &nbsp; &nbsp; Select MouseButton<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case EKEY_LButton<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End<br />&nbsp; &nbsp; &nbsp; EndSelect<br />EndIf </p><p>blabla..</p><br /><p>I get no reaction with EKEY_RButton&nbsp; and EKEY_MButton.<br />If i use EKEY_LButton and hit the RIGHT Mouse button, it works.<br />UH?</p><p>2) <br />How to implement a second window in Win32Example?<br />Cant get any events if i create a second MaxGUI window.</p>]]></description>
			<author><![CDATA[null@example.com (Takuan)]]></author>
			<pubDate>Wed, 11 Jan 2006 22:26:18 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=52#p52</guid>
		</item>
	</channel>
</rss>
