HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-187/)
-   -   Dropdown Menü (https://hx3.de/editing-scripting-187/dropdown-menue-24173/)

marc_book 17.08.2014 18:34

Dropdown Menü
 
Hallo,
ich möchte gerne ein Dropdown Menü in meine GUI einfügen, jedoch bin ich mir nicht sicher, welcher "type" ein Dropdown Menü ist.
Wäre echt cool wenn jemand nen Beispiel oder so was hätte.
Danke

marc_book 18.08.2014 00:50

Hat sich erledigt ist vom type 4

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
};



Alle Zeitangaben in WEZ +1. Es ist jetzt 20:51 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119