DialogControls-EditBox: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "#redirect " to "#REDIRECT ")
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
#REDIRECT [[CT_EDIT]]
===CT_EDIT=2===
A text box allows the user to either enter text himself, or to select and copy its content.<br>
{| border="1" cellpadding="3" cellspacing="0" |
! colspan="3" bgcolor="#bbbbff" | Properties
|-
! bgcolor="#ddddff" | Name
! bgcolor="#ddddff" | Type
! bgcolor="#ddddff" | Remark
|-
| '''autocomplete'''
| string ("scripting")
| entered text will automatically be completed with matching command
|-
| '''htmlControl'''
| boolean
| if used together with style=ST_MULTI, allows multi-line editable text fields.
|-
| '''lineSpacing'''
| float
| line spacing. Required, if the style was set to <tt>ST_MULTI</tt>.
|-
| '''colorSelection'''
| color array
|
|-
| '''size'''
| float
| possibly a typo, perhaps irrelevant xbox control
|-
|}<br clear="all">
 
* '''Example:'''
<code><nowiki>
class RscEdit
{
access = 0;
type = CT_EDIT;
style = ST_LEFT+ST_FRAME;
x = 0;
y = 0;
h = 0.04;
w = 0.2;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorSelection[] = {1,1,1,0.25};
font = "TahomaB";
sizeEx = 0.04;
autocomplete = "";
text = "";
size = 0.2;
shadow = 0;
};
class dialog
{
class controls
{
  class Value: RscEdit
  {
  idc = 120; // otherwise there's not much point
  x = 0.3025;
  y = 0.34;
  text = "whatever";
  autocomplete = "scripting";
  };
};
};
</nowiki></code>
[[Category: Dialogs]]

Latest revision as of 11:42, 30 December 2020

Redirect to: