Forum Replies Created
-
AuthorPosts
-
(Debian-Jessie) Ted2 will do the same for me if mx2cc returns an error and then I have to select the window again to regain input. But what’s worse is if I hit Open.. or Save.. then the requester opens and I get locked out of everything and have to restart my PC.
Anyone else have this problem?
If you are looking for a wait function, this is what I use:
Monkey12345Local StartTime:Double = Microsecs()Local WaitTime:Double = (1.0/15) * 1000000.0While (Microsecs() < StartTime + WaitTime)App.UpdateWindows()WendThis executes at 15 hertz. If you want to set a time, just change WaitTime to however many Microseconds you would like.
I couldn’t find any Delay or Wait function in the docs but I could have overlooked…
Wiebow could you post a tiny game example that uses mojox? I’m getting some weird errors when I build but I think it’s because I’m not placing things where I should be…
August 24, 2016 at 8:20 pm in reply to: FPS, Delta, FixedFPS, Timing, Animation Topic (almost done) #3425What integers does SwapInterval support? If i’m not mistaken, it calls to SDL_GL_SetSwapInterval but the documentation on it says 0 for immediate and 1 for vsync. In Monkey2 however, if you put 2 I get 30fps, 20fps with 3, etc… What’s officially supported and will putting 3 for example, give the same fps across all supported platforms?
Thanks for the information Mark! Regarding the mojox bug… With the new github module, if you take the code I posted above and remove button’s MaxSize and MinSize, button2’s seems to be ignored and will be set to whatever button is.
Monkey1234567891011121314151617181920212223Method New()Super.New( "Button Demo",640,480,WindowFlags.Resizable )Local button:=New PushButton( "Click ME! This is testing a longer message and it changes the other button size" )Local button2:=New PushButton( "Test" )button.Clicked=Lambda()Alert( "Well done sir!" )EndLocal TestView:=New DockingViewTestView.Layout = "float"TestView.AddView(button,"top")TestView.AddView(button2,"top")button.TextGravity=New Vec2f( .5,.5 )button2.MaxSize=New Vec2i( 100,0 )button2.MinSize=New Vec2i( 75,0 )button2.TextGravity=New Vec2f( .5,.5 )ContentView = TestViewEndI added a DockingView but I’m unsure how to properly add gadgets if I only want them displayed in the center. I ended up adding them to the “Top” view and made the DockingView layout “float” which doesn’t seem correct.
Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243444546#import "<std>"#import "<mojo>"#import "<mojox>"Using std..Using mojo..Using mojox..Class MyWindow Extends WindowMethod New()Super.New( "Button Demo",640,480,WindowFlags.Resizable )Local button:=New PushButton( "Click ME! This is testing a longer message" )Local button2:=New PushButton( "Test" )button.Clicked=Lambda()Alert( "Well done sir!" )EndLocal TestView:=New DockingViewTestView.Layout = "float"TestView.AddView(button,"top") 'This seems wrongTestView.AddView(button2,"top")button.MaxSize=New Vec2i( 100,0 )button.MinSize=New Vec2i( 75,0 )button.TextGravity=New Vec2f( .5,.5 ) 'This doesn't workbutton2.MaxSize=New Vec2i( 100,0 )button2.MinSize=New Vec2i( 75,0 )button2.TextGravity=New Vec2f( .5,.5 ) 'This doesn't workContentView = TestViewEndEndFunction Main()New AppInstanceNew MyWindowApp.Run()EndAlso I could not figure out how to center-align the text inside the button.
Awesome thanks Mark, I really appreciate the help. I think I’m going to like this new GUI system once I get the hang of it.
Just became a patreon supporter

I made a github account and i’ll start posting issues there. I’m also about to become a patreon supporter. I think you are doing a great job Mark
-
AuthorPosts