Dwight
Member
|
[Solved] MMO -> Character Selection
Dear reader,
I got myself stuck in a little bit of GUI work that Im doing in the MMO source code (I'm not making a MMO yet, I just want to have a look around at the code )
Code:
Gui+=super::create(Rect_R(D.w()-0.02f,0,1.2f,1.5f)).barVisible(false);
I have been looking almost everywhere, and I cannot seem to find the way of making a Rect_R not able to move.
I don't want to make another GUI in the GUI editor and then modify the source (yes I could, and that would solve it), but I would like to find out how I can make rectangles unmovable with the mouse and do some more finetuning while using code...
Is it possible? If so, how?
Thanks in advance!!!
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
(This post was last modified: 09-04-2011 11:39 AM by Dwight.)
|
|
09-03-2011 01:10 PM |
|
Harry
Member
|
RE: [Unsolved] MMO -> Character Selection
I think that you should just set proper flag to your gui window:
Code:
window.flag=~WIN_MOVABLE;
Check window.h header for more info.
(This post was last modified: 09-03-2011 07:20 PM by Harry.)
|
|
09-03-2011 07:18 PM |
|
Dwight
Member
|
RE: [Unsolved] MMO -> Character Selection
Thank you for your reply Harry!
Though flag is not a member of Rect_R... You can make windows unmovable that were created in the GUI editor that way. (Im using the same approach, with FlagDisable)
It just cannot be applied to rectangles. Nor can I find anything in the Rectangle.h...
So I guess that I cannot escape the fact that I cannot make rectangles unmovable.
Perhaps a feature request to the shapes?
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
|
|
09-03-2011 07:41 PM |
|
Harry
Member
|
RE: [Unsolved] MMO -> Character Selection
But why do you want use rectangle to create gui? I think that better way is to use ready-prepared classes for GUI.
Code:
Window window;
Gui+=window.create(Rect_R(D.w()-0.02f,0,1.2f,1.5f)).barVisible(false);
|
|
09-03-2011 11:12 PM |
|
Driklyn
Member
|
RE: [Unsolved] MMO -> Character Selection
Rectangles aren't Gui. They describe the position and size of objects (in this case, a Gui object).
The Gui object (Window) itself is being created during super::create. This means the class you are editing is derived from the Window class, like so:
Code:
struct CharacterSelection : Window
Harry is correct.
|
|
09-04-2011 01:14 AM |
|
Dwight
Member
|
RE: [Solved] MMO -> Character Selection
I just replaced the whole thing with my own work. It was a lot easier to do!
Thank you for all your replies!
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
|
|
09-04-2011 11:40 AM |
|