Jump to content

How to set group for CASTORGUI.GUIRadio ?


Ingo Chou
 Share

Recommended Posts

Yes it is because the position of text in a container became relative and not absolute.
Before there was a word problem that came out of the element and I fix in relative when text is in another element (window, panel ...) But I think with a bit of CSS on GUIManager you can adjust all of the text.
 
I just add a class 'GUIText' has the item for editing text with CSS.
 
Something like that:
var css = ".GUIText{top: 0px;}";

Tell me if this solve your problem, otherwise I would find another solution for you.

Link to comment
Share on other sites

There are some problems:

 

1. GUIText and other controls added in window / panel have the same y-position value, but they have been displayed at different y-position (different height).

 

2.  Many GUIText controls (e.g. 3 or 4) added in window / panel have the same y-position value, but they have been displayed at different y-position (different height).

     I want to display many GUIText controls in a same row with the same y-position value. 

 

3. It will auto create a scroll bar if GUIText out of panel, but controls will not move their position automatically follow the scroll bar except GUIText.

 

Thanks for your help.

Link to comment
Share on other sites

ok: delete ".GUIText{top: 0px;}"

 

I add an option {position: 'absolute' or 'relative'} on GUIText.

 

You have two choice :

 - Either add the absolute position your element GUIText (as before).

 - Either to use the relative position and reposition all your GUIText elements.

 

I also rename the option className by classe. I find most appropriate.

 

I put all the doc updated with changes/additions

Link to comment
Share on other sites

It should be good.

 

I also added an option "overflow" (hidden or auto - auto by default) for GUIPanel, GUIWindow and GUIDialog.

 

I also added option "inline" for GUIText for support back to the line of text in GUIPanel, GUIWindow and GUIDialog (false by default)

inline true to force the text has to be on one line. you have to use option overflow: auto to see all the text then.

Link to comment
Share on other sites

My problem is: 

 

The position of the panel added in window can not be changed by setting "x: ", "y: ".     

 


        var opt = { x: 0, y: 0, w: 290, h: 200, backgroundColor: "rgba(0,0,0,0.5)" };

        var panel = new CASTORGUI.GUIPanel("panel", opt, guisys, null, false);

        mywin.add(panel);

        panel.setVisible(true);

 


        var opt = { x: 50, y: 50, w: 290, h: 200, backgroundColor: "rgba(0,0,0,0.5)" };

        var panel = new CASTORGUI.GUIPanel("panel", opt, guisys, null, false);

        mywin.add(panel);

        panel.setVisible(true);

 

 

In addition, there is another problem:

 

the window(mywin) will display two panels at different position (one up one down) if I add two panels in window with the same position and same size (one show one hide).   

 

Thanks for your help!


Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...