Timeline for Libgdx getting screen size
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 14, 2016 at 16:56 | history | edited | user1430 |
edited tags
|
|
Mar 6, 2015 at 15:08 | answer | added | ROLO | timeline score: 3 | |
Jan 20, 2015 at 19:23 | comment | added | Ion Farima |
Can you specify the exception ? Gdx.graphics.getWidth() is static.
|
|
Jan 20, 2015 at 8:48 | answer | added | kingAm | timeline score: 3 | |
Jan 20, 2015 at 7:46 | answer | added | Aiman Batul | timeline score: 1 | |
Jan 19, 2015 at 14:54 | comment | added | bornander | Let us continue this discussion in chat. | |
Jan 19, 2015 at 14:53 | comment | added | Brsgamer | I haven't really changes anything in android activity i have set basic resolutions. As i said im really new to libgdx. I have read basic documentation but not much | |
Jan 19, 2015 at 14:47 | comment | added | bornander | Sorry, I missed it was for Android. What does your launcher class for Android look like (this is the class that extends AndroidApplication). And for the Desktop; what does the main class in the Desktop project look like? Also, are you calling this on a thread different than the UI thread? | |
Jan 19, 2015 at 14:43 | comment | added | Brsgamer | As said questions for android and also im testing it on desktop | |
Jan 19, 2015 at 14:42 | comment | added | bornander | What platform are you building for? Desktop, Android or HTML? | |
Jan 19, 2015 at 14:38 | comment | added | Brsgamer |
listen, i don't know libgdx very good. let me show you the code public Player(Vector2 position){ this.pos = position; speed = 500; } this is as you can see constructor for player class. Player p = new Player(new Vector2(224, 48)); and i have this in main class after class opens. i want to change that hardcoded numbers with screen width and height and modify it with basic - or + operators.
|
|
Jan 19, 2015 at 14:35 | comment | added | bornander | The LwjglApplication is responsible for setting the static graphics property on the Gdx class, if you don't new up an instance of LwjglApplication you're going to have to set Gdx.graphics yourself. | |
Jan 19, 2015 at 14:33 | comment | added | Brsgamer | sorry i don't understand | |
Jan 19, 2015 at 14:32 | comment | added | bornander | Are you calling that before or after you new up a LwjglApplication? | |
Jan 19, 2015 at 14:27 | review | First posts | |||
Jan 19, 2015 at 14:59 | |||||
Jan 19, 2015 at 14:25 | history | asked | Brsgamer | CC BY-SA 3.0 |