summaryrefslogtreecommitdiff
path: root/assets/ui/install_update.menu
blob: 8c811336f0d8dfb15b128613d6dd31d2a64c5ea0 (plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#include "ui/menudef.h"

{

#define W         450
#define H         300
#define BORDER    10

#define LIST_W    140
#define LIST_H    (H-(2*BORDER))
#define LIST_X    BORDER
#define LIST_Y    BORDER

#define BUTT_H    25
#define BUTT_W    45

#define INFO_W    (W-((2*BORDER)+LIST_W))
#define INFO_H    (H-((3*BORDER)+BUTT_H))
#define INFO_X    BORDER
#define INFO_Y    BORDER
#define INFO_TOFF 6

#define AU_ACT_NIL 0
#define AU_ACT_GET 1
#define AU_ACT_RUN 2

  menuDef
  {
    name "install_update"
    visible MENU_TRUE
    fullscreen MENU_FALSE
    outOfBoundsClick
    rect (320-(W/2)) (240-(H/2)) W H
    focusColor 1 .75 0 1
    style WINDOW_STYLE_FILLED
    popup
    onOpen
    {
        uiScript checkForUpdate;
    }
    onESC
    {
      play "sound/misc/menu1.wav";
      close install_update
    }

    itemDef
    {
      name window
      rect 0 0 W H
      style WINDOW_STYLE_FILLED
      backcolor 0 0 0 .75
      visible MENU_TRUE
      decoration
      border WINDOW_BORDER_KCGRADIENT
      borderSize 1.0
      borderColor 0.5 0.5 0.5 1
    }


    itemDef
    {
      name github_release
      rect 10 10 (W-10) (INFO_H-10)
      type ITEM_TYPE_LISTBOX
      style WINDOW_STYLE_EMPTY
      elementwidth 120
      elementheight 16
      textscale .33
      border WINDOW_BORDER_NONE
      bordersize 1
      bordercolor .5 .5 .5 1
      elementtype LISTBOX_TEXT
      feeder FEEDER_GITHUB_RELEASE
      notselectable
      visible MENU_TRUE
    }

//    itemDef
//    {
//      name OKCancel
//      text "Download"
//      type ITEM_TYPE_BUTTON
//      style WINDOW_STYLE_EMPTY
//      rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H
//      textalign ALIGN_CENTER
//      textvalign VALIGN_CENTER
//      textscale .4
//      forecolor 1 1 1 1
//      backcolor .5 0 0 .25
//      visible MENU_TRUE
//      cvarTest "ui_autoupdate_action"
//      showCvar { AU_ACT_GET }
//      action
//      {
//        play "sound/misc/menu1.wav";
//        uiScript DownloadUpdate;
//        close install_update 
//      }
//    }
//
//    itemDef
//    {
//      name OKCancel
//      text "Install"
//      type ITEM_TYPE_BUTTON
//      style WINDOW_STYLE_EMPTY
//      rect (W-((2*BORDER)+(2*BUTT_W))) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H
//      textalign ALIGN_CENTER
//      textvalign VALIGN_CENTER
//      textscale .4
//      forecolor 1 1 1 1
//      backcolor .5 0 0 .25
//      visible MENU_TRUE
//      cvarTest "ui_autoupdate_action"
//      showCvar { AU_ACT_RUN }
//      action
//      {
//        play "sound/misc/menu1.wav";
//        uiScript InstallUpdate;
//        close install_update 
//      }
//    }

    itemDef
    {
      name "OKCancel"
      text "Ok"
      type ITEM_TYPE_BUTTON
      style WINDOW_STYLE_EMPTY
      rect (W-(BORDER+BUTT_W)) (H-(BORDER+BUTT_H)) BUTT_W BUTT_H
      textalign ALIGN_CENTER
      textvalign VALIGN_CENTER
      textscale .4
      forecolor 1 1 1 1
      backcolor .5 0 0 .25
      visible MENU_TRUE
      action
      {
        play "sound/misc/menu3.wav";
        close install_update
      }
    }
  }
}