MichaelSch Posted December 19, 2014 Share Posted December 19, 2014 Hello everyone! I am new to Leadwerks as you may tell by my post count, but am quite familiar with C++ game programming (yes I am using C++). I am having an issue with Leadwerks::Window::Create() I am calling it like so: MainWindow = Leadwerks::Window::Create("Mystic Kingdoms",0,0,MKWidth, MKHeight); Basically, the problem is MKWidth and MKHeight do NOT set the proper width and height. It is setting it to essentially be maximized. However if I type in the number itself rather than these variables, I get it working properly. The reason I want to use a variable is because I want player options so they may in-game choose window resolution and have it saved out (using a file read / write system with encryption). Any ideas? Thanks in advance! -Michael S 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted December 19, 2014 Share Posted December 19, 2014 I suspect those numbers aren't what you think they are. Try setting a breakpoint and see what the values actually are. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
MichaelSch Posted December 20, 2014 Author Share Posted December 20, 2014 I did a System::Print and that says the numbers are exactly what I think they are. Any other ideas? That was the first thing I thought of by the way, great minds think alike -Michael S Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 20, 2014 Share Posted December 20, 2014 Can you show the script that sets the variables and tries to create the window? Quote Link to comment Share on other sites More sharing options...
MichaelSch Posted December 20, 2014 Author Share Posted December 20, 2014 Problem = solved. I was reading it in as a string and converting it to an int. This apparently = bad idea. Only reason I was doing that (so I don't seem like an idiot reading in a string as an int lol) was so I could use my encryption, but what I was doing particularly was not important enough to encrypt to enforce this. Just easier reading it in as an unencrypted int Thanks! -Michael S Great... Sorry for double post, but as SOON as I posted that I thought of a way to read it in as a string. It is now working as an encrypted string -Michael S EDIT: Apparently this forum kicks EXTREME a** because it added my "double post" into my previous post. Awesome. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.