smallfly |
22.08.2014 11:21 |
DropDown Beispiel Code im Zusammenhang
Vielleicht der Vollständigkeit halber ein komplettes Beispiel:
Inhalt der Datei " defaultStyle.h" welche wiederum in der Datei " description.ext" mit diesem Befehl einzubinden ist: #include "defaultStyle.h"
Code:
#define CT_COMBO 4
#define ST_MULTI 16
#define FARBE_HINTERGRUND {0.00, 0.00, 0.00, 0.70}
#define SCHWARZ_TRANSPARENT {0.00, 0.00, 0.00, 0.50}
#define WEISS_TRANSPARENT {1.00, 1.00, 1.00, 0.50}
#define GRAU_TRANSPARENT {0.50, 0.50, 0.50, 0.50}
#define FARBE_TRANSPARENT {0.00, 0.00, 0.00, 0.00}
#define FARBE_WEISS {1.00, 1.00, 1.00, 1.00}
#define FARBE_HELL_GRAU {0.75, 0.75, 0.75, 1.00}
#define FARBE_GRAU {0.50, 0.50, 0.50, 1.00}
#define FARBE_SCHWARZ {0.00, 0.00, 0.00, 1.00}
#define FARBE_KNALL_BLAU {0.18, 0.40, 0.77, 0.70}
class schmitt_rscScrollBalken
{
scrollSpeed= 0.06;
shadow = 0;
width = 0;
height = 0;
autoScrollEnabled= 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty= "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
color[] = FARBE_HELL_GRAU;
colorActive[] = FARBE_WEISS;
colorDisabled[]= FARBE_GRAU;
};
class schmitt_rscDropDownListe
{
// https://community.bistudio.com/wiki/DialogControls-Combo
type = CT_COMBO;
style = ST_MULTI;
x = 0;
y = 0;
w = 0.200;
h = 0.040;
sizeEx = 0.040; // "the font size of text (0..1)"
wholeHeight= 0.40; // "the height of the elapsed box."
font = "PuristaMedium";
shadow = 0;
maxHistoryDelay= 1.0;
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
colorBackground[] = GRAU_TRANSPARENT;
colorSelectBackground[]= FARBE_WEISS;
colorSelect[] = FARBE_SCHWARZ;
colorText[] = FARBE_WEISS;
color[] = FARBE_WEISS;
colorActive[] = FARBE_WEISS;
colorDisabled[] = FARBE_GRAU;
soundSelect[] = {"", 1.0, 1};
soundExpand[] = {"", 1.0, 1};
soundCollapse[]= {"", 1.0, 1};
class ComboScrollBar : schmitt_rscScrollBalken {};
};
In der Datei " MeinDialog.h" (oder ähnlich) im controls {} Block folgenden Code einfügen:
Code:
class MeineDropDownListe : schmitt_rscDropDownListe
{
idc = 1234; // beliebig
x = 0.0; // anzupassen
y = 0.0; // anzupassen
w = 0.25; // anzupassen
h = 0.04; // anzupassen
};
|