GuiBitmapCtrl
by GLKnight · in Torque Game Engine · 08/10/2008 (1:12 pm) · 9 replies
Trying to move the image of "emaga_healthwidget" at the top of the screen, horizontally.
Currently the two healthwidgets, both blue and red, are at the bottom of the screen to the left, because of this code:
horizSizing = "right";
vertSizing = "top";
position = "11 299";
...
Kind of a "shoot and miss" deal here. What i want is the healthwidget image to be horizontally displayed at the top of the screen! Exactly where the scorebox is...
i guess the horizSizing = "top" does not put it hoziontally on the top of the screen.
My guess for it to be horizontal is to redraw the png file. But using what Program?
Currently the two healthwidgets, both blue and red, are at the bottom of the screen to the left, because of this code:
horizSizing = "right";
vertSizing = "top";
position = "11 299";
...
Kind of a "shoot and miss" deal here. What i want is the healthwidget image to be horizontally displayed at the top of the screen! Exactly where the scorebox is...
i guess the horizSizing = "top" does not put it hoziontally on the top of the screen.
My guess for it to be horizontal is to redraw the png file. But using what Program?
About the author
#2
In no way does this invole the TGE, clicking and dragging to a desired postion. If it does i haven't found it yet.
I do realize that i need to position both the bitmapCtrl and the HealthBarHud at the top of the screen, horizontally.
The Question is How?
08/10/2008 (4:04 pm)
The GPAi1 book says little, if not nothing about the inGame GUI's. The GUI file that im modifying is called PlayerInterface.gui. This file is programmed to load the PNG healthwidget files, which encapsules the healthbar HUD. In no way does this invole the TGE, clicking and dragging to a desired postion. If it does i haven't found it yet.
I do realize that i need to position both the bitmapCtrl and the HealthBarHud at the top of the screen, horizontally.
The Question is How?
#3
Press F10 to open the Gui Editor. Er, F11, whichever isn't the mission editor.
Alternatively you can just modify the position, extent, and sizing options, which is what it looks like you are trying to do. Keep in mind that the position of a control is relative to its parent.
I would set the horizSizing to center, the vertSizing to bottom, and then calculate what the position needs to be depending on that controls extent and its parent controls extent. If the editor is working for you then after you set its horizSizing to center if you slightly resize the parent control it will auto-center.
08/10/2008 (4:29 pm)
Well if this control exists in a gui file you should be able to load that gui in the gui editor, drag the control where you want it, and then save.Press F10 to open the Gui Editor. Er, F11, whichever isn't the mission editor.
Alternatively you can just modify the position, extent, and sizing options, which is what it looks like you are trying to do. Keep in mind that the position of a control is relative to its parent.
I would set the horizSizing to center, the vertSizing to bottom, and then calculate what the position needs to be depending on that controls extent and its parent controls extent. If the editor is working for you then after you set its horizSizing to center if you slightly resize the parent control it will auto-center.
#4
Open the gui editor (F10), then move the objects to where you like.
set the vertSizing to "bottom".
08/10/2008 (10:22 pm)
If you want to take the gui objects to the top, then do this:Open the gui editor (F10), then move the objects to where you like.
set the vertSizing to "bottom".
#5
08/11/2008 (7:33 pm)
Thanks =)
#6
08/12/2008 (4:28 pm)
Currently the GUI BitmapCtrls are Verticle aligned to the bottom left hand corner of my screen. To toggle the inGame GUI i press f10 and try agian to align my GUIbitMaps verticly. After i have selected my bitmap, i click Center Horiz. Nothing. So i try Space Horiz. Still nothing. How do i get the GUI BItmaps Verticle?
#7
08/12/2008 (4:32 pm)
To quote myself, "If the editor is working for you then after you set its horizSizing to center if you slightly resize the parent control it will auto-center."
#8
=================================== <---[like this at the top]
|
|
|
|
| <---[this is how it is at the botom]
|
|
|
|
08/15/2008 (11:28 am)
Does that actually make the object horizontal? its not working for me. I did horizSizing 'center' and i can apply the change in position; yes it will auto-center to those coords, but it wont make the object horizontal. All i can do is drag it around left up down right, but i cant make it become horizontal=================================== <---[like this at the top]
|
|
|
|
| <---[this is how it is at the botom]
|
|
|
|
#9
08/15/2008 (11:36 am)
If you are trying to actually rotate the ctrl you can't do that. If you need the bitmap image to be landscape vs portrait, then you can modify the bitmap art file.
Associate James Ford
Sickhead Games
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1892