About Store Forum Documentation Contact



Post Reply 
My Questions
Author Message
Masterxilo Offline
Member

Post: #61
RE: My Questions
Is there any way I can add much more (about 100) properties to the window in "15 - Properties - Class Member Editing" and then make that a scrollable list?
Like this:
[Image: scrollablepropertieslis.jpg]

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
01-24-2010 05:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #62
RE: My Questions
you need to put first a Region
and then put properties into the Region,
after that, call region.setSize(NULL) it will automatically recalculate region size and display slidebars if needed
01-24-2010 05:48 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #63
RE: My Questions
hmm, I changed Init to
Code:
Bool Init()
{
   Text_ds.color =BLACK;
   Text_ds.align.set(0,0);
   Text_ds.shadow=0;

   Gui+=window.create(Rect_C(0,0,0.8,0.8),"Properties"); // create window
   window+=region.create();

   // setup properties
   props.New().create(MEMBER(SampleClass,   bool_member),   "bool_member");                                       // set property for '   bool_member'
   props.New().create(MEMBER(SampleClass,    int_member),    "int_member");                                       // set property for '    int_member'
   props.New().create(MEMBER(SampleClass,    flt_member),    "flt_member").range   (0,1);                         // set property for '    flt_member' and optionally clamp the values range
   props.New().create(MEMBER(SampleClass,   enum_member),   "enum_member").setEnum (enum_names,ELMS(enum_names)); // set property for '   enum_member'
   props.New().create(MEMBER(SampleClass,  color_member),  "color_member").setColor();                            // set property for '  color_member'
   props.New().create(DataDesc(DATA_INT).setFunc(PrivateMember,PrivateMember),"private_member");                  // set property for 'private_member'

   // add properties to the window
   static TextDS text_ds; text_ds=Gui.tds_text; text_ds.align.set(1,0); // set text draw settings
   AddProperties(props,region,Vec2(0.04,-0.04),&text_ds,0.3);

   // initialize GUI values from the Class Object
   REPAO(props).toGui(&object);

   region.setSize(NULL);

   return true;
}
but now the window is empty. region is defined as Region region;

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
01-24-2010 06:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #64
RE: My Questions
window+=region.create();

you havent specified rectangle for region
01-24-2010 06:10 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #65
RE: My Questions
ok, got it.
This creates a region filling an entire window:
Code:
window+=region.create(Rect(
       Vec2(0,-window.rect.size().y + window.barHeight()),
       Vec2(window.rect.size().x,0)
       ));
(is there an easier way to do this?)

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
01-24-2010 06:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #66
RE: My Questions
Rect_LU(0,0,window.crect.w(),window.crect.h())
01-24-2010 06:27 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #67
RE: My Questions
that works, ty
  • Is there any callback that is called when the size of a gui window is changed so I could react to that (resize/reposition gui components inside that window)?
    Or does the windws class have an internal method I could overwrite? Or is there at least some function that gets called when a gui component is updated?

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
(This post was last modified: 01-24-2010 07:56 PM by Masterxilo.)
01-24-2010 07:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #68
RE: My Questions
Quote:•Is there any callback that is called when the size of a gui window is changed so I could react to that (resize/reposition gui components inside that window)?
no

every gui object has virtual void update called each frame
01-24-2010 08:01 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #69
RE: My Questions
found it, thanks for pointing that out

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
01-24-2010 08:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #70
RE: My Questions
How do I change the system cursor to another builtin system cursor, say IDC_SIZEWE?
Is that possible with engine commands or will I have to use WinAPI commands (that would be SetCursor(LoadCursor(NULL, IDC_SIZEWE)); then)?
(I thought I should not use the windows api with esenthel)

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
(This post was last modified: 01-25-2010 07:23 PM by Masterxilo.)
01-25-2010 07:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #71
RE: My Questions
this is not supported,

you could instead prepare a set of GFX cursors, and change cursors to them (this is the suggested method)
01-25-2010 08:20 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #72
RE: My Questions
nvm., I managed to get windows cursors working as well (though that's not very cross platform thinking...).

Anyway, may I ask you something else?
How do I find out how wide the text (title) of a gui window is?
I guess I'd have to find out the font with which it's being drawn and then calculate the size of the rectangle that specific text in the title bar has.
But how would I do that?
(I need this to be able to set the minimum gui window size to the size of it's title bar)

And how do you add the "close" button (red cross) to a gui window?

Thanks in advance.

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
01-25-2010 08:45 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #73
RE: My Questions
TextDS tds=Gui.tds_window; tds.scale=_bar_height*0.87f;

then you can calculate text width using TextDS/Font methods

window.button[2].show()
01-25-2010 08:52 PM
Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #74
RE: My Questions
  • Where do you know the 0.87 from?
  • Do I have to add functionality to the maximize and minimize button myself?
  • Is there any virtual function which I can overload that is called when/after the Gui Window::create() function is called? (I need to initialize some things and I can only do that if the Window already exists)

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
(This post was last modified: 01-25-2010 09:09 PM by Masterxilo.)
01-25-2010 09:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Masterxilo Offline
Member

Post: #75
RE: My Questions
  • How can I make the camera move faster in the World editor when in Fpp mode?
  • How can I make the terrain brush even bigger than the maximum size when the camera is in Fpp mode (the "Scale size proportionally to camera distance" option only makes it a little bit bigger)?

System: Windows 7 Ultimate 64 bit, Q6600 2.4 GHZ, 4GB RAM, nVidia GeForce 260 GTX 896 MB DDR3

Visit my site: hurricane-eye.webs.com
And read my blog: hurricane-eyeent.blogspot.com
(This post was last modified: 01-26-2010 09:56 PM by Masterxilo.)
01-26-2010 09:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply