Ingo Chou Posted November 9, 2015 Share Posted November 9, 2015 Hi, I want to set a group for CASTORGUI.GUIRadio, so that it will auto keeping only one radio button is been checked at any time. How to do that? In addition, how to get check state (been checked or not ) of CASTORGUI.GUIRadio? Thanks for your help? Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 9, 2015 Author Share Posted November 9, 2015 In addition, how to GET / SET check state (been checked or not ) of CASTORGUI.GUIRadio? Thanks. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 9, 2015 Share Posted November 9, 2015 I add isChecked and setChecked for the radio element. Doc: https://github.com/dad72/CastorGUI/blob/master/doc/GUIRadio.md Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 10, 2015 Author Share Posted November 10, 2015 My web crashed when I new CASTORGUI.GUIManager I just replaced my local CASTORGUI folder with the new folder downloaded from github. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 10, 2015 Share Posted November 10, 2015 Oops sorry, parenthesis too. Fix. I also repair the resizing of the radio button (which as a percentage. (1 = 16px, 2 = 32 px ...)) Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 10, 2015 Author Share Posted November 10, 2015 Hi, The new version has a problem: The position of GUIText added in GUIPanel is incorrect. Is this by design / redesign or a new bug? However, I used a lot of these controls in my web. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 10, 2015 Share Posted November 10, 2015 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. Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 11, 2015 Author Share Posted November 11, 2015 OK, this design will be better. Now, It works well. Thank you for your timely reply and help! Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 11, 2015 Author Share Posted November 11, 2015 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. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2015 Share Posted November 11, 2015 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 Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 11, 2015 Author Share Posted November 11, 2015 I updated with the latest code. There is a problem: The panel added in window , dialog or panel all disappeared. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2015 Share Posted November 11, 2015 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. Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 14, 2015 Author Share Posted November 14, 2015 Hello, Now, by default, the panel added in windows can be displayed, the option "w", "h" can set width / height as before, but the options "x", "y" are invalid. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 14, 2015 Share Posted November 14, 2015 What do you mean by invalid?, You have screenshot and sample code that you use. I do not track this problem listed. may be a hidden bug. Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 15, 2015 Author Share Posted November 15, 2015 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! Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 15, 2015 Author Share Posted November 15, 2015 Sorry, the 2nd problem is caused because of my code. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 15, 2015 Share Posted November 15, 2015 Ok, fix. Quote Link to comment Share on other sites More sharing options...
Ingo Chou Posted November 16, 2015 Author Share Posted November 16, 2015 Thank you for your timely reply and help. It works well. Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.