1-- _________ __ __ 2-- / _____// |_____________ _/ |______ ____ __ __ ______ 3-- \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ 4-- / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ 5-- /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > 6-- \/ \/ \//_____/ \/ 7-- ______________________ ______________________ 8-- T H E W A R B E G I N S 9-- Stratagus - A free fantasy real time strategy game engine 10-- 11-- widgets.lua - Define the widgets 12-- 13-- (c) Copyright 2004-2019 by Jimmy Salmon and Andrettin 14-- 15-- This program is free software; you can redistribute it and/or modify 16-- it under the terms of the GNU General Public License as published by 17-- the Free Software Foundation; either version 2 of the License, or 18-- (at your option) any later version. 19-- 20-- This program is distributed in the hope that it will be useful, 21-- but WITHOUT ANY WARRANTY; without even the implied warranty of 22-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23-- GNU General Public License for more details. 24-- 25-- You should have received a copy of the GNU General Public License 26-- along with this program; if not, write to the Free Software 27-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 28-- 29 30DefineButtonStyle("main-dwarf", { 31 Size = {99, 13}, 32 Font = "game", 33 TextNormalColor = "white", 34 TextReverseColor = "yellow", 35 TextAlign = "Center", 36 TextPos = {50, 0}, 37 Default = { 38 File = "dwarf/ui/widgets/button-thinest-medium-normal.png", Size = {99, 13}, Frame = 0, 39 }, 40 Hover = { 41 TextNormalColor = "yellow", 42 }, 43 Clicked = { 44 File = "dwarf/ui/widgets/button-thinest-medium-pressed.png", Size = {99, 13}, Frame = 0, 45 TextNormalColor = "yellow", 46 TextPos = {51, 1}, 47 }, 48}) 49 50DefineButtonStyle("network-dwarf", { 51 Size = {80, 20}, 52 Font = "game", 53 TextNormalColor = "white", 54 TextReverseColor = "yellow", 55 TextAlign = "Center", 56 TextPos = {40, 4}, 57 Default = { 58 File = "dwarf/ui/widgets/button-thin-small-normal.png", Size = {80, 20}, Frame = 0, 59 }, 60 Hover = { 61 TextNormalColor = "yellow", 62 }, 63 Clicked = { 64 File = "dwarf/ui/widgets/button-thin-small-pressed.png", Size = {80, 20}, Frame = 0, 65 TextNormalColor = "yellow", 66 TextPos = {42, 6}, 67 }, 68}) 69 70DefineButtonStyle("main-germanic", { 71 Size = {99, 13}, 72 Font = "game", 73 TextNormalColor = "white", 74 TextReverseColor = "yellow", 75 TextAlign = "Center", 76 TextPos = {50, 0}, 77 Default = { 78 File = "germanic/ui/widgets/button-thinest-medium-normal.png", Size = {99, 13}, Frame = 0, 79 }, 80 Hover = { 81 TextNormalColor = "yellow", 82 }, 83 Clicked = { 84 File = "germanic/ui/widgets/button-thinest-medium-pressed.png", Size = {99, 13}, Frame = 0, 85 TextNormalColor = "yellow", 86 TextPos = {51, 1}, 87 }, 88}) 89 90DefineButtonStyle("network-germanic", { 91 Size = {80, 20}, 92 Font = "game", 93 TextNormalColor = "white", 94 TextReverseColor = "yellow", 95 TextAlign = "Center", 96 TextPos = {40, 4}, 97 Default = { 98 File = "germanic/ui/widgets/button-thin-small-normal.png", Size = {80, 20}, Frame = 0, 99 }, 100 Hover = { 101 TextNormalColor = "yellow", 102 }, 103 Clicked = { 104 File = "germanic/ui/widgets/button-thin-small-pressed.png", Size = {80, 20}, Frame = 0, 105 TextNormalColor = "yellow", 106 TextPos = {42, 6}, 107 }, 108}) 109 110DefineButtonStyle("main-gnome", { 111 Size = {99, 13}, 112 Font = "game", 113 TextNormalColor = "white", 114 TextReverseColor = "yellow", 115 TextAlign = "Center", 116 TextPos = {50, 0}, 117 Default = { 118 File = "dwarf/ui/widgets/button-thinest-medium-normal.png", Size = {99, 13}, Frame = 0, 119 }, 120 Hover = { 121 TextNormalColor = "yellow", 122 }, 123 Clicked = { 124 File = "dwarf/ui/widgets/button-thinest-medium-pressed.png", Size = {99, 13}, Frame = 0, 125 TextNormalColor = "yellow", 126 TextPos = {51, 1}, 127 }, 128}) 129 130DefineButtonStyle("network-gnome", { 131 Size = {80, 20}, 132 Font = "game", 133 TextNormalColor = "white", 134 TextReverseColor = "yellow", 135 TextAlign = "Center", 136 TextPos = {40, 4}, 137 Default = { 138 File = "gnome/ui/widgets/button-thin-small-normal.png", Size = {80, 20}, Frame = 0, 139 }, 140 Hover = { 141 TextNormalColor = "yellow", 142 }, 143 Clicked = { 144 File = "gnome/ui/widgets/button-thin-small-pressed.png", Size = {80, 20}, Frame = 0, 145 TextNormalColor = "yellow", 146 TextPos = {42, 6}, 147 }, 148}) 149 150DefineButtonStyle("main-goblin", { 151 Size = {99, 13}, 152 Font = "game", 153 TextNormalColor = "white", 154 TextReverseColor = "yellow", 155 TextAlign = "Center", 156 TextPos = {50, 0}, 157 Default = { 158 File = "goblin/ui/widgets/button-thinest-medium-normal.png", Size = {99, 13}, Frame = 0, 159 }, 160 Hover = { 161 TextNormalColor = "yellow", 162 }, 163 Clicked = { 164 File = "goblin/ui/widgets/button-thinest-medium-pressed.png", Size = {99, 13}, Frame = 0, 165 TextNormalColor = "yellow", 166 TextPos = {51, 1}, 167 }, 168}) 169 170DefineButtonStyle("network-goblin", { 171 Size = {80, 20}, 172 Font = "game", 173 TextNormalColor = "white", 174 TextReverseColor = "yellow", 175 TextAlign = "Center", 176 TextPos = {40, 4}, 177 Default = { 178 File = "goblin/ui/widgets/button-thin-small-normal.png", Size = {80, 20}, Frame = 0, 179 }, 180 Hover = { 181 TextNormalColor = "yellow", 182 }, 183 Clicked = { 184 File = "goblin/ui/widgets/button-thin-small-pressed.png", Size = {80, 20}, Frame = 0, 185 TextNormalColor = "yellow", 186 TextPos = {42, 6}, 187 }, 188}) 189 190DefineButtonStyle("icon", { 191 Size = {46, 38}, 192 Font = "game", 193 TextNormalColor = "yellow", 194 TextReverseColor = "yellow", 195 TextAlign = "Right", 196 TextPos = {46, 26}, 197 Default = { 198 Border = { 199 Color = {0, 0, 0}, Size = 1, 200 }, 201 }, 202 Hover = { 203 TextNormalColor = "yellow", 204 Border = { 205 Color = {128, 128, 128}, Size = 0, 206 }, 207 }, 208 Clicked = { 209 TextNormalColor = "yellow", 210 Border = { 211 Color = {128, 128, 128}, Size = 0, 212 }, 213 }, 214}) 215 216DefineButtonStyle("world-earth", { 217 Size = {19, 19}, 218 Font = "game", 219 TextNormalColor = "white", 220 TextReverseColor = "yellow", 221 TextAlign = "Center", 222 TextPos = {10, 0}, 223 Default = { 224 File = "germanic/ui/widgets/radio-normal-selected.png", Size = {19, 19}, Frame = 0, 225 }, 226 Hover = { 227 TextNormalColor = "yellow", 228 }, 229 Clicked = { 230 File = "germanic/ui/widgets/radio-pressed-selected.png", Size = {19, 19}, Frame = 0 231 } 232}) 233 234DefineButtonStyle("world-jotunheim", { 235 Size = {19, 19}, 236 Font = "game", 237 TextNormalColor = "white", 238 TextReverseColor = "yellow", 239 TextAlign = "Center", 240 TextPos = {10, 0}, 241 Default = { 242 File = "goblin/ui/widgets/radio-normal-selected.png", Size = {19, 19}, Frame = 0, 243 }, 244 Hover = { 245 TextNormalColor = "yellow", 246 }, 247 Clicked = { 248 File = "goblin/ui/widgets/radio-pressed-selected.png", Size = {19, 19}, Frame = 0 249 } 250}) 251 252DefineButtonStyle("world-nidavellir", { 253 Size = {19, 19}, 254 Font = "game", 255 TextNormalColor = "white", 256 TextReverseColor = "yellow", 257 TextAlign = "Center", 258 TextPos = {10, 0}, 259 Default = { 260 File = "dwarf/ui/widgets/radio-normal-selected.png", Size = {19, 19}, Frame = 0, 261 }, 262 Hover = { 263 TextNormalColor = "yellow", 264 }, 265 Clicked = { 266 File = "dwarf/ui/widgets/radio-pressed-selected.png", Size = {19, 19}, Frame = 0 267 } 268}) 269