Jump to content
Sign in to follow this  
Ilias48rus

Working on GUII, asking help.

Recommended Posts

Will put here some questions which will get on the work, appreciate any help and hope someone will can find something useful in the theme for their work.

Current questions is:
1.How to control 'what will be front | behind of something' ?
2.How to make creating list with buttons on right mouse click with passing to functions on the buttons information according to what item of the interface mouse was over at time of the click.
3.How to create list which will handle selecting, deselecting it's items instead of changing selected item?

Share this post


Link to post
Share on other sites

Sorry what "bumping" the theme, but is it so difficult questions what no one can answer?

Share this post


Link to post
Share on other sites
1.How to control 'what will be front | behind of something' ? 

 

 

When creating the configuration classes, each control (as you go down the page) will be layered on top of each other. Example:

class RscDisplayTest
{
  idd = -1;
  class Controls
  {
    class Title : RscText
    {
      text = "This is my title";
      x = 0;
      y = 0;
      w = 4 * GUI_GRID_W;
      h = 1 * GUI_GRID_H;
    };
    class Icon : RscText
    {
      text = "#(argb,8,8,3)color(1,1,1,1)";
      x = 0;
      y = 0;
      w = 2 * GUI_GRID_W;
      h = 1 * GUI_GRID_H;
    };
  };
};

The picture control will be displayed on top of the title control.

 

2.How to make creating list with buttons on right mouse click with passing to functions on the buttons information according to what item of the interface mouse was over at time of the click.

 

I do not understand the question

 

3.How to create list which will handle selecting, deselecting it's items instead of changing selected item?

 

I am assuming you are using a RscListbox control to do this. Its simple enough through the use of UI event handlers. In the display definition class, put the following line into the Listbox control class:

onLBSelChanged = "_nul = _this execVM ""rscListBoxEnhancedSelection.sqf"";";

RscListBoxEnhancedSelection.sqf:

_this params [
  ["_listboxCtrl",controlNull,[controlnull]],
  ["_selection",-1,[0]]
];

_prevSelection = _listboxCtrl getVariable ["CurSelection",-1];
if (_prevSelection == _selection) then {
  // you have selected an already selected item - deselect instead
  _listboxCtrl lbSetCurSel -1;
} else {
  _listboxCtrl setVariable ["CurSelection",_selection];
};

(Code not tested)

 

 

 

Hope that helps,

Bull

  • Like 2

Share this post


Link to post
Share on other sites

bull_a

Thank you, definitely helps.

1. copy.

2. (pressing RMB on some item in list for example and menu with buttons popping up and functions on the buttons should understand what item was "'RMBed'")

Few more questions:

2.1. How to add buttons and other controls to items in list? 2.1.1 How to make it all expandable?

 

3. will try, thanks.

 

thanks again ) .

Share this post


Link to post
Share on other sites
The picture control will be displayed on top of the title control.

I guies it doesn't working with rscmap

Share this post


Link to post
Share on other sites

anyone know control class of the direction choosing circle from 2d editor?

Share this post


Link to post
Share on other sites

I want to get tree view same as in eden editor with ability to drag items between folders, would really appreciate anyone's help with the multiselection and dragging.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×