| @@ -0,0 +1,46 @@ | |||
| 1 | + | Module | |
| 2 | + | name: game_interface | |
| 3 | + | description: Create the game interface, where the ingame stuff starts | |
| 4 | + | author: OTClient team | |
| 5 | + | website: https://github.com/edubart/otclient | |
| 6 | + | sandboxed: true | |
| 7 | + | scripts: [ widgets/uigamemap, gameinterface ] | |
| 8 | + | load-later: | |
| 9 | + | - game_buttons | |
| 10 | + | - game_hotkeys | |
| 11 | + | - game_questlog | |
| 12 | + | - game_textmessage | |
| 13 | + | ||
| 14 | + | - game_chat | |
| 15 | + | - game_outfit | |
| 16 | + | - game_skills | |
| 17 | + | - game_inventory | |
| 18 | + | - game_containers | |
| 19 | + | - game_viplist | |
| 20 | + | - game_battle | |
| 21 | + | - game_minimap | |
| 22 | + | - game_npctrade | |
| 23 | + | - game_textwindow | |
| 24 | + | - game_playertrade | |
| 25 | + | - game_bugreport | |
| 26 | + | - game_playerdeath | |
| 27 | + | - game_playermount | |
| 28 | + | - game_ruleviolation | |
| 29 | + | - game_market | |
| 30 | + | - game_spelllist | |
| 31 | + | - game_cooldown | |
| 32 | + | - game_modaldialog | |
| 33 | + | - game_unjustifiedpoints | |
| 34 | + | - game_walking | |
| 35 | + | - game_shop | |
| 36 | + | - game_itemselector | |
| 37 | + | - client_textedit | |
| 38 | + | - game_actionbar | |
| 39 | + | - game_prey | |
| 40 | + | - game_imbuing | |
| 41 | + | - game_stats | |
| 42 | + | - game_shaders | |
| 43 | + | - game_bot | |
| 44 | + | - game_damage_numbers | |
| 45 | + | @onLoad: init() | |
| 46 | + | @onUnload: terminate() |
| @@ -0,0 +1,53 @@ | |||
| 1 | + | CountWindow < MainWindow | |
| 2 | + | id: countWindow | |
| 3 | + | !text: tr('Move Stackable Item') | |
| 4 | + | size: 196 90 | |
| 5 | + | ||
| 6 | + | SpinBox | |
| 7 | + | id: spinBox | |
| 8 | + | anchors.left: parent.left | |
| 9 | + | anchors.top: parent.top | |
| 10 | + | width: 1 | |
| 11 | + | height: 1 | |
| 12 | + | phantom: true | |
| 13 | + | margin-top: 2 | |
| 14 | + | focusable: true | |
| 15 | + | ||
| 16 | + | Item | |
| 17 | + | id: item | |
| 18 | + | anchors.left: parent.left | |
| 19 | + | anchors.top: parent.top | |
| 20 | + | margin-top: 2 | |
| 21 | + | margin-left: -4 | |
| 22 | + | focusable: false | |
| 23 | + | virtual: true | |
| 24 | + | ||
| 25 | + | HorizontalScrollBar | |
| 26 | + | id: countScrollBar | |
| 27 | + | anchors.left: prev.right | |
| 28 | + | anchors.right: parent.right | |
| 29 | + | anchors.top: prev.top | |
| 30 | + | margin-left: 10 | |
| 31 | + | margin-top: -2 | |
| 32 | + | focusable: false | |
| 33 | + | ||
| 34 | + | Button | |
| 35 | + | id: buttonCancel | |
| 36 | + | !text: tr('Cancel') | |
| 37 | + | height: 20 | |
| 38 | + | anchors.left: countScrollBar.horizontalCenter | |
| 39 | + | anchors.right: countScrollBar.right | |
| 40 | + | anchors.top: countScrollBar.bottom | |
| 41 | + | margin-top: 7 | |
| 42 | + | focusable: false | |
| 43 | + | ||
| 44 | + | Button | |
| 45 | + | id: buttonOk | |
| 46 | + | !text: tr('Ok') | |
| 47 | + | height: 20 | |
| 48 | + | anchors.right: countScrollBar.horizontalCenter | |
| 49 | + | anchors.left: countScrollBar.left | |
| 50 | + | anchors.top: countScrollBar.bottom | |
| 51 | + | margin-top: 7 | |
| 52 | + | margin-right: 6 | |
| 53 | + | focusable: false |
| @@ -0,0 +1,1079 @@ | |||
| 1 | + | MainWindow | |
| 2 | + | id: tradeWindow | |
| 3 | + | image-source: /images/custom/UI/central_back | |
| 4 | + | $!mobile: | |
| 5 | + | size: 570 365 | |
| 6 | + | draggable: true | |
| 7 | + | @onEscape: onTradeClose() | |
| 8 | + | ||
| 9 | + | $mobile: | |
| 10 | + | size: 370 265 | |
| 11 | + | draggable: false | |
| 12 | + | ||
| 13 | + | UIButton | |
| 14 | + | id: traderTarget | |
| 15 | + | size: 230 25 | |
| 16 | + | text-align: left | |
| 17 | + | font: sans-bold-16px | |
| 18 | + | anchors.top: parent.top | |
| 19 | + | anchors.left: parent.left | |
| 20 | + | margin-left: 05 | |
| 21 | + | margin-top: -20 | |
| 22 | + | $!mobile: | |
| 23 | + | size: 230 25 | |
| 24 | + | ||
| 25 | + | $mobile: | |
| 26 | + | size: 150 25 | |
| 27 | + | ||
| 28 | + | UIButton | |
| 29 | + | id: Loading | |
| 30 | + | size: 52 52 | |
| 31 | + | image-source: /images/custom/UI/loading | |
| 32 | + | image-size: 52 52 | |
| 33 | + | phantom: true | |
| 34 | + | anchors.top: parent.top | |
| 35 | + | anchors.left: parent.left | |
| 36 | + | $!mobile: | |
| 37 | + | margin-left: 95 | |
| 38 | + | margin-top: 80 | |
| 39 | + | ||
| 40 | + | $mobile: | |
| 41 | + | margin-left: 50 | |
| 42 | + | margin-top: 50 | |
| 43 | + | ||
| 44 | + | UIButton | |
| 45 | + | id: txtLoading | |
| 46 | + | font: lucida-11px-rounded | |
| 47 | + | !text: tr('Aguardando resposta...') | |
| 48 | + | text-wrap: true | |
| 49 | + | phantom: true | |
| 50 | + | anchors.top: Loading.bottom | |
| 51 | + | anchors.left: parent.left | |
| 52 | + | margin-top: 10 | |
| 53 | + | $!mobile: | |
| 54 | + | margin-left: 48 | |
| 55 | + | size: 155 25 | |
| 56 | + | ||
| 57 | + | $mobile: | |
| 58 | + | margin-left: 25 | |
| 59 | + | size: 100 50 | |
| 60 | + | ||
| 61 | + | UIButton | |
| 62 | + | id: tradeMobileWindow | |
| 63 | + | size: 147 155 | |
| 64 | + | anchors.top: traderTarget.bottom | |
| 65 | + | anchors.left: parent.left | |
| 66 | + | margin-left: 05 | |
| 67 | + | margin-top: 05 | |
| 68 | + | visible: false | |
| 69 | + | ||
| 70 | + | VerticalScrollBar | |
| 71 | + | id: TraderListScrollBar | |
| 72 | + | anchors.top: parent.top | |
| 73 | + | anchors.bottom: parent.bottom | |
| 74 | + | anchors.right: parent.right | |
| 75 | + | step: 24 | |
| 76 | + | margin-top: 01 | |
| 77 | + | pixels-scroll: true | |
| 78 | + | ||
| 79 | + | ScrollablePanel | |
| 80 | + | id: TraderMobilePanel | |
| 81 | + | size: 147 102 | |
| 82 | + | anchors.left: parent.left | |
| 83 | + | anchors.right: prev.left | |
| 84 | + | anchors.top: parent.top | |
| 85 | + | vertical-scrollbar: TraderListScrollBar | |
| 86 | + | margin-top: 01 | |
| 87 | + | margin-left: 2 | |
| 88 | + | margin-right: 5 | |
| 89 | + | layout: | |
| 90 | + | type: grid | |
| 91 | + | cell-size: 42 50 | |
| 92 | + | flow: true | |
| 93 | + | ||
| 94 | + | UIButton | |
| 95 | + | id: MobileTBag1 | |
| 96 | + | text-offset: 00 30 | |
| 97 | + | image-source: /images/custom/UI/item_slot | |
| 98 | + | margin-left: 03 | |
| 99 | + | margin-top: 03 | |
| 100 | + | ||
| 101 | + | UIButton | |
| 102 | + | id: MobileTBag2 | |
| 103 | + | text-offset: 00 30 | |
| 104 | + | image-source: /images/custom/UI/item_slot | |
| 105 | + | margin-left: 03 | |
| 106 | + | margin-top: 03 | |
| 107 | + | ||
| 108 | + | UIButton | |
| 109 | + | id: MobileTBag3 | |
| 110 | + | text-offset: 00 30 | |
| 111 | + | image-source: /images/custom/UI/item_slot | |
| 112 | + | margin-left: 03 | |
| 113 | + | margin-top: 03 | |
| 114 | + | ||
| 115 | + | UIButton | |
| 116 | + | id: MobileTBag4 | |
| 117 | + | text-offset: 00 30 | |
| 118 | + | image-source: /images/custom/UI/item_slot | |
| 119 | + | margin-left: 03 | |
| 120 | + | margin-top: 03 | |
| 121 | + | ||
| 122 | + | UIButton | |
| 123 | + | id: MobileTBag5 | |
| 124 | + | text-offset: 00 30 | |
| 125 | + | image-source: /images/custom/UI/item_slot | |
| 126 | + | margin-left: 03 | |
| 127 | + | margin-top: 03 | |
| 128 | + | ||
| 129 | + | UIButton | |
| 130 | + | id: MobileTBag6 | |
| 131 | + | text-offset: 00 30 | |
| 132 | + | image-source: /images/custom/UI/item_slot | |
| 133 | + | margin-left: 03 | |
| 134 | + | margin-top: 03 | |
| 135 | + | ||
| 136 | + | UIButton | |
| 137 | + | id: MobileTBag7 | |
| 138 | + | text-offset: 00 30 | |
| 139 | + | image-source: /images/custom/UI/item_slot | |
| 140 | + | margin-left: 03 | |
| 141 | + | margin-top: 03 | |
| 142 | + | ||
| 143 | + | UIButton | |
| 144 | + | id: MobileTBag8 | |
| 145 | + | text-offset: 00 30 | |
| 146 | + | image-source: /images/custom/UI/item_slot | |
| 147 | + | margin-left: 03 | |
| 148 | + | margin-top: 03 | |
| 149 | + | ||
| 150 | + | UIButton | |
| 151 | + | id: MobileTBag9 | |
| 152 | + | text-offset: 00 30 | |
| 153 | + | image-source: /images/custom/UI/item_slot | |
| 154 | + | margin-left: 03 | |
| 155 | + | margin-top: 03 | |
| 156 | + | ||
| 157 | + | UIButton | |
| 158 | + | id: MobileTBag10 | |
| 159 | + | text-offset: 00 30 | |
| 160 | + | image-source: /images/custom/UI/item_slot | |
| 161 | + | margin-left: 03 | |
| 162 | + | margin-top: 03 | |
| 163 | + | ||
| 164 | + | UIButton | |
| 165 | + | id: MobileTBag11 | |
| 166 | + | text-offset: 00 30 | |
| 167 | + | image-source: /images/custom/UI/item_slot | |
| 168 | + | margin-left: 03 | |
| 169 | + | margin-top: 03 | |
| 170 | + | ||
| 171 | + | UIButton | |
| 172 | + | id: MobileTBag12 | |
| 173 | + | text-offset: 00 30 | |
| 174 | + | image-source: /images/custom/UI/item_slot | |
| 175 | + | margin-left: 03 | |
| 176 | + | margin-top: 03 | |
| 177 | + | ||
| 178 | + | UIButton | |
| 179 | + | id: MobileTBag13 | |
| 180 | + | text-offset: 00 30 | |
| 181 | + | image-source: /images/custom/UI/item_slot | |
| 182 | + | margin-left: 03 | |
| 183 | + | margin-top: 03 | |
| 184 | + | ||
| 185 | + | UIButton | |
| 186 | + | id: MobileTBag14 | |
| 187 | + | text-offset: 00 30 | |
| 188 | + | image-source: /images/custom/UI/item_slot | |
| 189 | + | margin-left: 03 | |
| 190 | + | margin-top: 03 | |
| 191 | + | ||
| 192 | + | UIButton | |
| 193 | + | id: MobileTBag15 | |
| 194 | + | text-offset: 00 30 | |
| 195 | + | image-source: /images/custom/UI/item_slot | |
| 196 | + | margin-left: 03 | |
| 197 | + | margin-top: 03 | |
| 198 | + | ||
| 199 | + | UIButton | |
| 200 | + | id: MobileTBag16 | |
| 201 | + | text-offset: 00 30 | |
| 202 | + | image-source: /images/custom/UI/item_slot | |
| 203 | + | margin-left: 03 | |
| 204 | + | margin-top: 03 | |
| 205 | + | ||
| 206 | + | UIButton | |
| 207 | + | id: MobileTBag17 | |
| 208 | + | text-offset: 00 30 | |
| 209 | + | image-source: /images/custom/UI/item_slot | |
| 210 | + | margin-left: 03 | |
| 211 | + | margin-top: 03 | |
| 212 | + | ||
| 213 | + | UIButton | |
| 214 | + | id: MobileTBag18 | |
| 215 | + | text-offset: 00 30 | |
| 216 | + | image-source: /images/custom/UI/item_slot | |
| 217 | + | margin-left: 03 | |
| 218 | + | margin-top: 03 | |
| 219 | + | ||
| 220 | + | UIButton | |
| 221 | + | id: MobileTBag19 | |
| 222 | + | text-offset: 00 30 | |
| 223 | + | image-source: /images/custom/UI/item_slot | |
| 224 | + | margin-left: 03 | |
| 225 | + | margin-top: 03 | |
| 226 | + | ||
| 227 | + | UIButton | |
| 228 | + | id: MobileTBag20 | |
| 229 | + | text-offset: 00 30 | |
| 230 | + | image-source: /images/custom/UI/item_slot | |
| 231 | + | margin-left: 03 | |
| 232 | + | margin-top: 03 | |
| 233 | + | ||
| 234 | + | UIButton | |
| 235 | + | id: MobileTGCoin | |
| 236 | + | text: 0 | |
| 237 | + | size: 120 20 | |
| 238 | + | image-source: /images/custom/UI/goldInfo | |
| 239 | + | anchors.top: TraderMobilePanel.bottom | |
| 240 | + | anchors.left: parent.left | |
| 241 | + | margin-left: 05 | |
| 242 | + | margin-top: 05 | |
| 243 | + | ||
| 244 | + | UIButton | |
| 245 | + | id: MobileTVCoin | |
| 246 | + | text: 0 | |
| 247 | + | size: 120 20 | |
| 248 | + | image-source: /images/custom/UI/vipinfo | |
| 249 | + | anchors.top: MobileTGCoin.bottom | |
| 250 | + | anchors.left: parent.left | |
| 251 | + | margin-left: 05 | |
| 252 | + | margin-top: 05 | |
| 253 | + | ||
| 254 | + | UIButton | |
| 255 | + | id: traderWindow | |
| 256 | + | size: 230 250 | |
| 257 | + | anchors.top: traderTarget.bottom | |
| 258 | + | anchors.left: parent.left | |
| 259 | + | margin-left: 05 | |
| 260 | + | margin-top: 05 | |
| 261 | + | visible: false | |
| 262 | + | ||
| 263 | + | UIButton | |
| 264 | + | id: TBag1 | |
| 265 | + | size: 42 50 | |
| 266 | + | text-offset: 00 30 | |
| 267 | + | image-source: /images/custom/UI/item_slot | |
| 268 | + | anchors.top: parent.top | |
| 269 | + | anchors.left: parent.left | |
| 270 | + | margin-left: 02 | |
| 271 | + | margin-top: 05 | |
| 272 | + | opacity: 0.8 | |
| 273 | + | ||
| 274 | + | UIButton | |
| 275 | + | id: TBag2 | |
| 276 | + | size: 42 50 | |
| 277 | + | text-offset: 00 30 | |
| 278 | + | image-source: /images/custom/UI/item_slot | |
| 279 | + | anchors.top: parent.top | |
| 280 | + | anchors.left: TBag1.right | |
| 281 | + | margin-left: 05 | |
| 282 | + | margin-top: 05 | |
| 283 | + | opacity: 0.8 | |
| 284 | + | ||
| 285 | + | UIButton | |
| 286 | + | id: TBag3 | |
| 287 | + | size: 42 50 | |
| 288 | + | text-offset: 00 30 | |
| 289 | + | image-source: /images/custom/UI/item_slot | |
| 290 | + | anchors.top: parent.top | |
| 291 | + | anchors.left: TBag2.right | |
| 292 | + | margin-left: 05 | |
| 293 | + | margin-top: 05 | |
| 294 | + | opacity: 0.8 | |
| 295 | + | ||
| 296 | + | UIButton | |
| 297 | + | id: TBag4 | |
| 298 | + | size: 42 50 | |
| 299 | + | text-offset: 00 30 | |
| 300 | + | image-source: /images/custom/UI/item_slot | |
| 301 | + | anchors.top: parent.top | |
| 302 | + | anchors.left: TBag3.right | |
| 303 | + | margin-left: 05 | |
| 304 | + | margin-top: 05 | |
| 305 | + | opacity: 0.8 | |
| 306 | + | ||
| 307 | + | UIButton | |
| 308 | + | id: TBag5 | |
| 309 | + | size: 42 50 | |
| 310 | + | text-offset: 00 30 | |
| 311 | + | image-source: /images/custom/UI/item_slot | |
| 312 | + | anchors.top: parent.top | |
| 313 | + | anchors.left: TBag4.right | |
| 314 | + | margin-left: 05 | |
| 315 | + | margin-top: 05 | |
| 316 | + | opacity: 0.8 | |
| 317 | + | ||
| 318 | + | UIButton | |
| 319 | + | id: TBag6 | |
| 320 | + | size: 42 50 | |
| 321 | + | text-offset: 00 30 | |
| 322 | + | image-source: /images/custom/UI/item_slot | |
| 323 | + | anchors.top: TBag1.bottom | |
| 324 | + | anchors.left: parent.left | |
| 325 | + | margin-left: 02 | |
| 326 | + | margin-top: 05 | |
| 327 | + | opacity: 0.8 | |
| 328 | + | ||
| 329 | + | UIButton | |
| 330 | + | id: TBag7 | |
| 331 | + | size: 42 50 | |
| 332 | + | text-offset: 00 30 | |
| 333 | + | image-source: /images/custom/UI/item_slot | |
| 334 | + | anchors.top: TBag1.bottom | |
| 335 | + | anchors.left: TBag6.right | |
| 336 | + | margin-left: 05 | |
| 337 | + | margin-top: 05 | |
| 338 | + | opacity: 0.8 | |
| 339 | + | ||
| 340 | + | UIButton | |
| 341 | + | id: TBag8 | |
| 342 | + | size: 42 50 | |
| 343 | + | text-offset: 00 30 | |
| 344 | + | image-source: /images/custom/UI/item_slot | |
| 345 | + | anchors.top: TBag1.bottom | |
| 346 | + | anchors.left: TBag7.right | |
| 347 | + | margin-left: 05 | |
| 348 | + | margin-top: 05 | |
| 349 | + | opacity: 0.8 | |
| 350 | + | ||
| 351 | + | UIButton | |
| 352 | + | id: TBag9 | |
| 353 | + | size: 42 50 | |
| 354 | + | text-offset: 00 30 | |
| 355 | + | image-source: /images/custom/UI/item_slot | |
| 356 | + | anchors.top: TBag1.bottom | |
| 357 | + | anchors.left: TBag8.right | |
| 358 | + | margin-left: 05 | |
| 359 | + | margin-top: 05 | |
| 360 | + | opacity: 0.8 | |
| 361 | + | ||
| 362 | + | UIButton | |
| 363 | + | id: TBag10 | |
| 364 | + | size: 42 50 | |
| 365 | + | text-offset: 00 30 | |
| 366 | + | image-source: /images/custom/UI/item_slot | |
| 367 | + | anchors.top: TBag1.bottom | |
| 368 | + | anchors.left: TBag9.right | |
| 369 | + | margin-left: 05 | |
| 370 | + | margin-top: 05 | |
| 371 | + | opacity: 0.8 | |
| 372 | + | ||
| 373 | + | UIButton | |
| 374 | + | id: TBag11 | |
| 375 | + | size: 42 50 | |
| 376 | + | text-offset: 00 30 | |
| 377 | + | image-source: /images/custom/UI/item_slot | |
| 378 | + | anchors.top: TBag10.bottom | |
| 379 | + | anchors.left: parent.left | |
| 380 | + | margin-left: 02 | |
| 381 | + | margin-top: 05 | |
| 382 | + | opacity: 0.8 | |
| 383 | + | ||
| 384 | + | UIButton | |
| 385 | + | id: TBag12 | |
| 386 | + | size: 42 50 | |
| 387 | + | text-offset: 00 30 | |
| 388 | + | image-source: /images/custom/UI/item_slot | |
| 389 | + | anchors.top: TBag10.bottom | |
| 390 | + | anchors.left: TBag11.right | |
| 391 | + | margin-left: 05 | |
| 392 | + | margin-top: 05 | |
| 393 | + | opacity: 0.8 | |
| 394 | + | ||
| 395 | + | UIButton | |
| 396 | + | id: TBag13 | |
| 397 | + | size: 42 50 | |
| 398 | + | text-offset: 00 30 | |
| 399 | + | image-source: /images/custom/UI/item_slot | |
| 400 | + | anchors.top: TBag10.bottom | |
| 401 | + | anchors.left: TBag12.right | |
| 402 | + | margin-left: 05 | |
| 403 | + | margin-top: 05 | |
| 404 | + | opacity: 0.8 | |
| 405 | + | ||
| 406 | + | UIButton | |
| 407 | + | id: TBag14 | |
| 408 | + | size: 42 50 | |
| 409 | + | text-offset: 00 30 | |
| 410 | + | image-source: /images/custom/UI/item_slot | |
| 411 | + | anchors.top: TBag10.bottom | |
| 412 | + | anchors.left: TBag13.right | |
| 413 | + | margin-left: 05 | |
| 414 | + | margin-top: 05 | |
| 415 | + | opacity: 0.8 | |
| 416 | + | ||
| 417 | + | UIButton | |
| 418 | + | id: TBag15 | |
| 419 | + | size: 42 50 | |
| 420 | + | text-offset: 00 30 | |
| 421 | + | image-source: /images/custom/UI/item_slot | |
| 422 | + | anchors.top: TBag10.bottom | |
| 423 | + | anchors.left: TBag14.right | |
| 424 | + | margin-left: 05 | |
| 425 | + | margin-top: 05 | |
| 426 | + | opacity: 0.8 | |
| 427 | + | ||
| 428 | + | UIButton | |
| 429 | + | id: TBag16 | |
| 430 | + | size: 42 50 | |
| 431 | + | text-offset: 00 30 | |
| 432 | + | image-source: /images/custom/UI/item_slot | |
| 433 | + | anchors.top: TBag15.bottom | |
| 434 | + | anchors.left: parent.left | |
| 435 | + | margin-left: 02 | |
| 436 | + | margin-top: 05 | |
| 437 | + | opacity: 0.8 | |
| 438 | + | ||
| 439 | + | UIButton | |
| 440 | + | id: TBag17 | |
| 441 | + | size: 42 50 | |
| 442 | + | text-offset: 00 30 | |
| 443 | + | image-source: /images/custom/UI/item_slot | |
| 444 | + | anchors.top: TBag15.bottom | |
| 445 | + | anchors.left: TBag16.right | |
| 446 | + | margin-left: 05 | |
| 447 | + | margin-top: 05 | |
| 448 | + | opacity: 0.8 | |
| 449 | + | ||
| 450 | + | UIButton | |
| 451 | + | id: TBag18 | |
| 452 | + | size: 42 50 | |
| 453 | + | text-offset: 00 30 | |
| 454 | + | image-source: /images/custom/UI/item_slot | |
| 455 | + | anchors.top: TBag15.bottom | |
| 456 | + | anchors.left: TBag17.right | |
| 457 | + | margin-left: 05 | |
| 458 | + | margin-top: 05 | |
| 459 | + | opacity: 0.8 | |
| 460 | + | ||
| 461 | + | UIButton | |
| 462 | + | id: TBag19 | |
| 463 | + | size: 42 50 | |
| 464 | + | text-offset: 00 30 | |
| 465 | + | image-source: /images/custom/UI/item_slot | |
| 466 | + | anchors.top: TBag15.bottom | |
| 467 | + | anchors.left: TBag18.right | |
| 468 | + | margin-left: 05 | |
| 469 | + | margin-top: 05 | |
| 470 | + | opacity: 0.8 | |
| 471 | + | ||
| 472 | + | UIButton | |
| 473 | + | id: TBag20 | |
| 474 | + | size: 42 50 | |
| 475 | + | text-offset: 00 30 | |
| 476 | + | image-source: /images/custom/UI/item_slot | |
| 477 | + | anchors.top: TBag15.bottom | |
| 478 | + | anchors.left: TBag19.right | |
| 479 | + | margin-left: 05 | |
| 480 | + | margin-top: 05 | |
| 481 | + | opacity: 0.8 | |
| 482 | + | ||
| 483 | + | UIButton | |
| 484 | + | id: TGCoin | |
| 485 | + | text: 0 | |
| 486 | + | size: 135 20 | |
| 487 | + | image-source: /images/custom/UI/goldInfo | |
| 488 | + | anchors.top: TBag20.bottom | |
| 489 | + | anchors.left: parent.left | |
| 490 | + | margin-left: 02 | |
| 491 | + | margin-top: 05 | |
| 492 | + | ||
| 493 | + | UIButton | |
| 494 | + | id: TVCoin | |
| 495 | + | text: 0 | |
| 496 | + | size: 135 20 | |
| 497 | + | image-source: /images/custom/UI/vipinfo | |
| 498 | + | anchors.top: TGCoin.bottom | |
| 499 | + | anchors.left: parent.left | |
| 500 | + | margin-left: 02 | |
| 501 | + | margin-top: 05 | |
| 502 | + | ||
| 503 | + | UIButton | |
| 504 | + | id: playerOwn | |
| 505 | + | size: 230 25 | |
| 506 | + | text-align: right | |
| 507 | + | font: sans-bold-16px | |
| 508 | + | anchors.top: parent.top | |
| 509 | + | anchors.right: parent.right | |
| 510 | + | margin-right: 05 | |
| 511 | + | margin-top: -20 | |
| 512 | + | ||
| 513 | + | UIButton | |
| 514 | + | id: playerMobileWindow | |
| 515 | + | size: 147 155 | |
| 516 | + | anchors.top: playerOwn.bottom | |
| 517 | + | anchors.right: parent.right | |
| 518 | + | margin-right: 05 | |
| 519 | + | margin-top: 05 | |
| 520 | + | $!mobile: | |
| 521 | + | visible: false | |
| 522 | + | ||
| 523 | + | $mobile: | |
| 524 | + | visible: true | |
| 525 | + | ||
| 526 | + | VerticalScrollBar | |
| 527 | + | id: TradeListScrollBar | |
| 528 | + | anchors.top: parent.top | |
| 529 | + | anchors.bottom: parent.bottom | |
| 530 | + | anchors.right: parent.right | |
| 531 | + | step: 24 | |
| 532 | + | margin-top: 01 | |
| 533 | + | pixels-scroll: true | |
| 534 | + | ||
| 535 | + | ScrollablePanel | |
| 536 | + | id: TradeMobilePanel | |
| 537 | + | size: 147 102 | |
| 538 | + | anchors.left: parent.left | |
| 539 | + | anchors.right: prev.left | |
| 540 | + | anchors.top: parent.top | |
| 541 | + | vertical-scrollbar: TradeListScrollBar | |
| 542 | + | margin-top: 01 | |
| 543 | + | margin-left: 2 | |
| 544 | + | margin-right: 5 | |
| 545 | + | layout: | |
| 546 | + | type: grid | |
| 547 | + | cell-size: 42 50 | |
| 548 | + | flow: true | |
| 549 | + | ||
| 550 | + | UIButton | |
| 551 | + | id: MobilePBag1 | |
| 552 | + | text-offset: 00 30 | |
| 553 | + | image-source: /images/custom/UI/item_slot | |
| 554 | + | margin-left: 03 | |
| 555 | + | margin-top: 03 | |
| 556 | + | ||
| 557 | + | UIButton | |
| 558 | + | id: MobilePBag2 | |
| 559 | + | text-offset: 00 30 | |
| 560 | + | image-source: /images/custom/UI/item_slot | |
| 561 | + | margin-left: 03 | |
| 562 | + | margin-top: 03 | |
| 563 | + | ||
| 564 | + | UIButton | |
| 565 | + | id: MobilePBag3 | |
| 566 | + | text-offset: 00 30 | |
| 567 | + | image-source: /images/custom/UI/item_slot | |
| 568 | + | margin-left: 03 | |
| 569 | + | margin-top: 03 | |
| 570 | + | ||
| 571 | + | UIButton | |
| 572 | + | id: MobilePBag4 | |
| 573 | + | text-offset: 00 30 | |
| 574 | + | image-source: /images/custom/UI/item_slot | |
| 575 | + | margin-left: 03 | |
| 576 | + | margin-top: 03 | |
| 577 | + | ||
| 578 | + | UIButton | |
| 579 | + | id: MobilePBag5 | |
| 580 | + | text-offset: 00 30 | |
| 581 | + | image-source: /images/custom/UI/item_slot | |
| 582 | + | margin-left: 03 | |
| 583 | + | margin-top: 03 | |
| 584 | + | ||
| 585 | + | UIButton | |
| 586 | + | id: MobilePBag6 | |
| 587 | + | text-offset: 00 30 | |
| 588 | + | image-source: /images/custom/UI/item_slot | |
| 589 | + | margin-left: 03 | |
| 590 | + | margin-top: 03 | |
| 591 | + | ||
| 592 | + | UIButton | |
| 593 | + | id: MobilePBag7 | |
| 594 | + | text-offset: 00 30 | |
| 595 | + | image-source: /images/custom/UI/item_slot | |
| 596 | + | margin-left: 03 | |
| 597 | + | margin-top: 03 | |
| 598 | + | ||
| 599 | + | UIButton | |
| 600 | + | id: MobilePBag8 | |
| 601 | + | text-offset: 00 30 | |
| 602 | + | image-source: /images/custom/UI/item_slot | |
| 603 | + | margin-left: 03 | |
| 604 | + | margin-top: 03 | |
| 605 | + | ||
| 606 | + | UIButton | |
| 607 | + | id: MobilePBag9 | |
| 608 | + | text-offset: 00 30 | |
| 609 | + | image-source: /images/custom/UI/item_slot | |
| 610 | + | margin-left: 03 | |
| 611 | + | margin-top: 03 | |
| 612 | + | ||
| 613 | + | UIButton | |
| 614 | + | id: MobilePBag10 | |
| 615 | + | text-offset: 00 30 | |
| 616 | + | image-source: /images/custom/UI/item_slot | |
| 617 | + | margin-left: 03 | |
| 618 | + | margin-top: 03 | |
| 619 | + | ||
| 620 | + | UIButton | |
| 621 | + | id: MobilePBag11 | |
| 622 | + | text-offset: 00 30 | |
| 623 | + | image-source: /images/custom/UI/item_slot | |
| 624 | + | margin-left: 03 | |
| 625 | + | margin-top: 03 | |
| 626 | + | ||
| 627 | + | UIButton | |
| 628 | + | id: MobilePBag12 | |
| 629 | + | text-offset: 00 30 | |
| 630 | + | image-source: /images/custom/UI/item_slot | |
| 631 | + | margin-left: 03 | |
| 632 | + | margin-top: 03 | |
| 633 | + | ||
| 634 | + | UIButton | |
| 635 | + | id: MobilePBag13 | |
| 636 | + | text-offset: 00 30 | |
| 637 | + | image-source: /images/custom/UI/item_slot | |
| 638 | + | margin-left: 03 | |
| 639 | + | margin-top: 03 | |
| 640 | + | ||
| 641 | + | UIButton | |
| 642 | + | id: MobilePBag14 | |
| 643 | + | text-offset: 00 30 | |
| 644 | + | image-source: /images/custom/UI/item_slot | |
| 645 | + | margin-left: 03 | |
| 646 | + | margin-top: 03 | |
| 647 | + | ||
| 648 | + | UIButton | |
| 649 | + | id: MobilePBag15 | |
| 650 | + | text-offset: 00 30 | |
| 651 | + | image-source: /images/custom/UI/item_slot | |
| 652 | + | margin-left: 03 | |
| 653 | + | margin-top: 03 | |
| 654 | + | ||
| 655 | + | UIButton | |
| 656 | + | id: MobilePBag16 | |
| 657 | + | text-offset: 00 30 | |
| 658 | + | image-source: /images/custom/UI/item_slot | |
| 659 | + | margin-left: 03 | |
| 660 | + | margin-top: 03 | |
| 661 | + | ||
| 662 | + | UIButton | |
| 663 | + | id: MobilePBag17 | |
| 664 | + | text-offset: 00 30 | |
| 665 | + | image-source: /images/custom/UI/item_slot | |
| 666 | + | margin-left: 03 | |
| 667 | + | margin-top: 03 | |
| 668 | + | ||
| 669 | + | UIButton | |
| 670 | + | id: MobilePBag18 | |
| 671 | + | text-offset: 00 30 | |
| 672 | + | image-source: /images/custom/UI/item_slot | |
| 673 | + | margin-left: 03 | |
| 674 | + | margin-top: 03 | |
| 675 | + | ||
| 676 | + | UIButton | |
| 677 | + | id: MobilePBag19 | |
| 678 | + | text-offset: 00 30 | |
| 679 | + | image-source: /images/custom/UI/item_slot | |
| 680 | + | margin-left: 03 | |
| 681 | + | margin-top: 03 | |
| 682 | + | ||
| 683 | + | UIButton | |
| 684 | + | id: MobilePBag20 | |
| 685 | + | text-offset: 00 30 | |
| 686 | + | image-source: /images/custom/UI/item_slot | |
| 687 | + | margin-left: 03 | |
| 688 | + | margin-top: 03 | |
| 689 | + | ||
| 690 | + | UIButton | |
| 691 | + | id: MobilePGCoin | |
| 692 | + | text: 0 | |
| 693 | + | size: 95 20 | |
| 694 | + | image-source: /images/custom/UI/goldInfo | |
| 695 | + | anchors.top: TradeMobilePanel.bottom | |
| 696 | + | anchors.left: parent.left | |
| 697 | + | margin-left: 05 | |
| 698 | + | margin-top: 05 | |
| 699 | + | ||
| 700 | + | UIButton | |
| 701 | + | id: MobileInsertGCoin | |
| 702 | + | size: 25 18 | |
| 703 | + | text: + | |
| 704 | + | font: sans-bold-16px | |
| 705 | + | image-source: /images/custom/UI/button_2 | |
| 706 | + | anchors.top: TradeMobilePanel.bottom | |
| 707 | + | anchors.left: MobilePGCoin.right | |
| 708 | + | margin-left: 05 | |
| 709 | + | margin-top: 05 | |
| 710 | + | opacity: 0.8 | |
| 711 | + | $pressed: | |
| 712 | + | opacity: 0.6 | |
| 713 | + | $hover !pressed: | |
| 714 | + | opacity: 1.0 | |
| 715 | + | ||
| 716 | + | UIButton | |
| 717 | + | id: MobilePVCoin | |
| 718 | + | text: 0 | |
| 719 | + | size: 95 20 | |
| 720 | + | image-source: /images/custom/UI/vipinfo | |
| 721 | + | anchors.top: MobilePGCoin.bottom | |
| 722 | + | anchors.left: parent.left | |
| 723 | + | margin-left: 05 | |
| 724 | + | margin-top: 05 | |
| 725 | + | ||
| 726 | + | UIButton | |
| 727 | + | id: MobileInsertVCoin | |
| 728 | + | size: 25 18 | |
| 729 | + | text: + | |
| 730 | + | font: sans-bold-16px | |
| 731 | + | image-source: /images/custom/UI/button_1 | |
| 732 | + | anchors.top: MobileInsertGCoin.bottom | |
| 733 | + | anchors.left: MobilePVCoin.right | |
| 734 | + | margin-left: 05 | |
| 735 | + | margin-top: 07 | |
| 736 | + | opacity: 0.8 | |
| 737 | + | $pressed: | |
| 738 | + | opacity: 0.6 | |
| 739 | + | $hover !pressed: | |
| 740 | + | opacity: 1.0 | |
| 741 | + | ||
| 742 | + | UIButton | |
| 743 | + | id: playerWindow | |
| 744 | + | size: 230 280 | |
| 745 | + | anchors.top: playerOwn.bottom | |
| 746 | + | anchors.right: parent.right | |
| 747 | + | margin-right: 05 | |
| 748 | + | margin-top: 05 | |
| 749 | + | $!mobile: | |
| 750 | + | visible: true | |
| 751 | + | ||
| 752 | + | $mobile: | |
| 753 | + | visible: false | |
| 754 | + | ||
| 755 | + | UIButton | |
| 756 | + | id: PBag1 | |
| 757 | + | size: 42 50 | |
| 758 | + | text-offset: 00 30 | |
| 759 | + | image-source: /images/custom/UI/item_slot | |
| 760 | + | anchors.top: parent.top | |
| 761 | + | anchors.left: parent.left | |
| 762 | + | margin-left: 05 | |
| 763 | + | margin-top: 05 | |
| 764 | + | ||
| 765 | + | UIButton | |
| 766 | + | id: PBag2 | |
| 767 | + | size: 42 50 | |
| 768 | + | text-offset: 00 30 | |
| 769 | + | image-source: /images/custom/UI/item_slot | |
| 770 | + | anchors.top: parent.top | |
| 771 | + | anchors.left: PBag1.right | |
| 772 | + | margin-left: 05 | |
| 773 | + | margin-top: 05 | |
| 774 | + | ||
| 775 | + | UIButton | |
| 776 | + | id: PBag3 | |
| 777 | + | size: 42 50 | |
| 778 | + | text-offset: 00 30 | |
| 779 | + | image-source: /images/custom/UI/item_slot | |
| 780 | + | anchors.top: parent.top | |
| 781 | + | anchors.left: PBag2.right | |
| 782 | + | margin-left: 05 | |
| 783 | + | margin-top: 05 | |
| 784 | + | ||
| 785 | + | UIButton | |
| 786 | + | id: PBag4 | |
| 787 | + | size: 42 50 | |
| 788 | + | text-offset: 00 30 | |
| 789 | + | image-source: /images/custom/UI/item_slot | |
| 790 | + | anchors.top: parent.top | |
| 791 | + | anchors.left: PBag3.right | |
| 792 | + | margin-left: 05 | |
| 793 | + | margin-top: 05 | |
| 794 | + | ||
| 795 | + | UIButton | |
| 796 | + | id: PBag5 | |
| 797 | + | size: 42 50 | |
| 798 | + | text-offset: 00 30 | |
| 799 | + | image-source: /images/custom/UI/item_slot | |
| 800 | + | anchors.top: parent.top | |
| 801 | + | anchors.left: PBag4.right | |
| 802 | + | margin-left: 05 | |
| 803 | + | margin-top: 05 | |
| 804 | + | ||
| 805 | + | UIButton | |
| 806 | + | id: PBag6 | |
| 807 | + | size: 42 50 | |
| 808 | + | text-offset: 00 30 | |
| 809 | + | image-source: /images/custom/UI/item_slot | |
| 810 | + | anchors.top: PBag1.bottom | |
| 811 | + | anchors.left: parent.left | |
| 812 | + | margin-left: 05 | |
| 813 | + | margin-top: 05 | |
| 814 | + | ||
| 815 | + | UIButton | |
| 816 | + | id: PBag7 | |
| 817 | + | size: 42 50 | |
| 818 | + | text-offset: 00 30 | |
| 819 | + | image-source: /images/custom/UI/item_slot | |
| 820 | + | anchors.top: PBag1.bottom | |
| 821 | + | anchors.left: PBag6.right | |
| 822 | + | margin-left: 05 | |
| 823 | + | margin-top: 05 | |
| 824 | + | ||
| 825 | + | UIButton | |
| 826 | + | id: PBag8 | |
| 827 | + | size: 42 50 | |
| 828 | + | text-offset: 00 30 | |
| 829 | + | image-source: /images/custom/UI/item_slot | |
| 830 | + | anchors.top: PBag1.bottom | |
| 831 | + | anchors.left: PBag7.right | |
| 832 | + | margin-left: 05 | |
| 833 | + | margin-top: 05 | |
| 834 | + | ||
| 835 | + | UIButton | |
| 836 | + | id: PBag9 | |
| 837 | + | size: 42 50 | |
| 838 | + | text-offset: 00 30 | |
| 839 | + | image-source: /images/custom/UI/item_slot | |
| 840 | + | anchors.top: PBag1.bottom | |
| 841 | + | anchors.left: PBag8.right | |
| 842 | + | margin-left: 05 | |
| 843 | + | margin-top: 05 | |
| 844 | + | ||
| 845 | + | UIButton | |
| 846 | + | id: PBag10 | |
| 847 | + | size: 42 50 | |
| 848 | + | text-offset: 00 30 | |
| 849 | + | image-source: /images/custom/UI/item_slot | |
| 850 | + | anchors.top: PBag1.bottom | |
| 851 | + | anchors.left: PBag9.right | |
| 852 | + | margin-left: 05 | |
| 853 | + | margin-top: 05 | |
| 854 | + | ||
| 855 | + | UIButton | |
| 856 | + | id: PBag11 | |
| 857 | + | size: 42 50 | |
| 858 | + | text-offset: 00 30 | |
| 859 | + | image-source: /images/custom/UI/item_slot | |
| 860 | + | anchors.top: PBag10.bottom | |
| 861 | + | anchors.left: parent.left | |
| 862 | + | margin-left: 05 | |
| 863 | + | margin-top: 05 | |
| 864 | + | ||
| 865 | + | UIButton | |
| 866 | + | id: PBag12 | |
| 867 | + | size: 42 50 | |
| 868 | + | text-offset: 00 30 | |
| 869 | + | image-source: /images/custom/UI/item_slot | |
| 870 | + | anchors.top: PBag10.bottom | |
| 871 | + | anchors.left: PBag11.right | |
| 872 | + | margin-left: 05 | |
| 873 | + | margin-top: 05 | |
| 874 | + | ||
| 875 | + | UIButton | |
| 876 | + | id: PBag13 | |
| 877 | + | size: 42 50 | |
| 878 | + | text-offset: 00 30 | |
| 879 | + | image-source: /images/custom/UI/item_slot | |
| 880 | + | anchors.top: PBag10.bottom | |
| 881 | + | anchors.left: PBag12.right | |
| 882 | + | margin-left: 05 | |
| 883 | + | margin-top: 05 | |
| 884 | + | ||
| 885 | + | UIButton | |
| 886 | + | id: PBag14 | |
| 887 | + | size: 42 50 | |
| 888 | + | text-offset: 00 30 | |
| 889 | + | image-source: /images/custom/UI/item_slot | |
| 890 | + | anchors.top: PBag10.bottom | |
| 891 | + | anchors.left: PBag13.right | |
| 892 | + | margin-left: 05 | |
| 893 | + | margin-top: 05 | |
| 894 | + | ||
| 895 | + | UIButton | |
| 896 | + | id: PBag15 | |
| 897 | + | size: 42 50 | |
| 898 | + | text-offset: 00 30 | |
| 899 | + | image-source: /images/custom/UI/item_slot | |
| 900 | + | anchors.top: PBag10.bottom | |
| 901 | + | anchors.left: PBag14.right | |
| 902 | + | margin-left: 05 | |
| 903 | + | margin-top: 05 | |
| 904 | + | ||
| 905 | + | UIButton | |
| 906 | + | id: PBag16 | |
| 907 | + | size: 42 50 | |
| 908 | + | text-offset: 00 30 | |
| 909 | + | image-source: /images/custom/UI/item_slot | |
| 910 | + | anchors.top: PBag15.bottom | |
| 911 | + | anchors.left: parent.left | |
| 912 | + | margin-left: 05 | |
| 913 | + | margin-top: 05 | |
| 914 | + | ||
| 915 | + | UIButton | |
| 916 | + | id: PBag17 | |
| 917 | + | size: 42 50 | |
| 918 | + | text-offset: 00 30 | |
| 919 | + | image-source: /images/custom/UI/item_slot | |
| 920 | + | anchors.top: PBag15.bottom | |
| 921 | + | anchors.left: PBag16.right | |
| 922 | + | margin-left: 05 | |
| 923 | + | margin-top: 05 | |
| 924 | + | ||
| 925 | + | UIButton | |
| 926 | + | id: PBag18 | |
| 927 | + | size: 42 50 | |
| 928 | + | text-offset: 00 30 | |
| 929 | + | image-source: /images/custom/UI/item_slot | |
| 930 | + | anchors.top: PBag15.bottom | |
| 931 | + | anchors.left: PBag17.right | |
| 932 | + | margin-left: 05 | |
| 933 | + | margin-top: 05 | |
| 934 | + | ||
| 935 | + | UIButton | |
| 936 | + | id: PBag19 | |
| 937 | + | size: 42 50 | |
| 938 | + | text-offset: 00 30 | |
| 939 | + | image-source: /images/custom/UI/item_slot | |
| 940 | + | anchors.top: PBag15.bottom | |
| 941 | + | anchors.left: PBag18.right | |
| 942 | + | margin-left: 05 | |
| 943 | + | margin-top: 05 | |
| 944 | + | ||
| 945 | + | UIButton | |
| 946 | + | id: PBag20 | |
| 947 | + | size: 42 50 | |
| 948 | + | text-offset: 00 30 | |
| 949 | + | image-source: /images/custom/UI/item_slot | |
| 950 | + | anchors.top: PBag15.bottom | |
| 951 | + | anchors.left: PBag19.right | |
| 952 | + | margin-left: 05 | |
| 953 | + | margin-top: 05 | |
| 954 | + | ||
| 955 | + | UIButton | |
| 956 | + | id: PGCoin | |
| 957 | + | text: 0 | |
| 958 | + | size: 135 20 | |
| 959 | + | image-source: /images/custom/UI/goldInfo | |
| 960 | + | anchors.top: PBag20.bottom | |
| 961 | + | anchors.left: parent.left | |
| 962 | + | margin-left: 05 | |
| 963 | + | margin-top: 05 | |
| 964 | + | ||
| 965 | + | UIButton | |
| 966 | + | id: InsertGCoin | |
| 967 | + | size: 88 18 | |
| 968 | + | text: + | |
| 969 | + | font: sans-bold-16px | |
| 970 | + | image-source: /images/custom/UI/button_2 | |
| 971 | + | anchors.top: PBag20.bottom | |
| 972 | + | anchors.left: PGCoin.right | |
| 973 | + | margin-left: 05 | |
| 974 | + | margin-top: 05 | |
| 975 | + | opacity: 0.8 | |
| 976 | + | $pressed: | |
| 977 | + | opacity: 0.6 | |
| 978 | + | $hover !pressed: | |
| 979 | + | opacity: 1.0 | |
| 980 | + | ||
| 981 | + | UIButton | |
| 982 | + | id: PVCoin | |
| 983 | + | text: 0 | |
| 984 | + | size: 135 20 | |
| 985 | + | image-source: /images/custom/UI/vipinfo | |
| 986 | + | anchors.top: PGCoin.bottom | |
| 987 | + | anchors.left: parent.left | |
| 988 | + | margin-left: 05 | |
| 989 | + | margin-top: 05 | |
| 990 | + | ||
| 991 | + | UIButton | |
| 992 | + | id: InsertVCoin | |
| 993 | + | size: 88 18 | |
| 994 | + | text: + | |
| 995 | + | font: sans-bold-16px | |
| 996 | + | image-source: /images/custom/UI/button_1 | |
| 997 | + | anchors.top: InsertGCoin.bottom | |
| 998 | + | anchors.left: PVCoin.right | |
| 999 | + | margin-left: 05 | |
| 1000 | + | margin-top: 07 | |
| 1001 | + | opacity: 0.8 | |
| 1002 | + | $pressed: | |
| 1003 | + | opacity: 0.6 | |
| 1004 | + | $hover !pressed: | |
| 1005 | + | opacity: 1.0 | |
| 1006 | + | ||
| 1007 | + | UIButton | |
| 1008 | + | id: StartTrade | |
| 1009 | + | !text: tr('INICIAR TROCA') | |
| 1010 | + | image-source: /images/custom/UI/button | |
| 1011 | + | font: lucida-11px-rounded | |
| 1012 | + | anchors.bottom: parent.bottom | |
| 1013 | + | anchors.right: parent.right | |
| 1014 | + | margin-right: 05 | |
| 1015 | + | margin-bottom: 02 | |
| 1016 | + | opacity: 0.8 | |
| 1017 | + | $pressed: | |
| 1018 | + | opacity: 0.6 | |
| 1019 | + | $hover !pressed: | |
| 1020 | + | opacity: 1.0 | |
| 1021 | + | $!mobile: | |
| 1022 | + | size: 230 25 | |
| 1023 | + | ||
| 1024 | + | $mobile: | |
| 1025 | + | size: 147 25 | |
| 1026 | + | ||
| 1027 | + | UIButton | |
| 1028 | + | id: CancelTrade | |
| 1029 | + | !text: tr('CANCELAR') | |
| 1030 | + | image-source: /images/custom/UI/button_3 | |
| 1031 | + | font: lucida-11px-rounded | |
| 1032 | + | anchors.bottom: parent.bottom | |
| 1033 | + | anchors.left: parent.left | |
| 1034 | + | margin-left: 05 | |
| 1035 | + | margin-bottom: 02 | |
| 1036 | + | opacity: 0.8 | |
| 1037 | + | $pressed: | |
| 1038 | + | opacity: 0.6 | |
| 1039 | + | $hover !pressed: | |
| 1040 | + | opacity: 1.0 | |
| 1041 | + | $!mobile: | |
| 1042 | + | size: 230 25 | |
| 1043 | + | ||
| 1044 | + | $mobile: | |
| 1045 | + | size: 147 25 | |
| 1046 | + | ||
| 1047 | + | TextEdit | |
| 1048 | + | id: goldInsert | |
| 1049 | + | text-wrap: true | |
| 1050 | + | $!mobile: | |
| 1051 | + | size: 135 20 | |
| 1052 | + | anchors.bottom: parent.bottom | |
| 1053 | + | anchors.right: parent.right | |
| 1054 | + | margin-right: 100 | |
| 1055 | + | margin-bottom: 65 | |
| 1056 | + | ||
| 1057 | + | $mobile: | |
| 1058 | + | size: 95 20 | |
| 1059 | + | anchors.bottom: parent.bottom | |
| 1060 | + | anchors.right: parent.right | |
| 1061 | + | margin-right: 53 | |
| 1062 | + | margin-bottom: 77 | |
| 1063 | + | ||
| 1064 | + | TextEdit | |
| 1065 | + | id: vipInsert | |
| 1066 | + | text-wrap: true | |
| 1067 | + | $!mobile: | |
| 1068 | + | size: 135 20 | |
| 1069 | + | anchors.bottom: parent.bottom | |
| 1070 | + | anchors.right: parent.right | |
| 1071 | + | margin-right: 100 | |
| 1072 | + | margin-bottom: 38 | |
| 1073 | + | ||
| 1074 | + | $mobile: | |
| 1075 | + | size: 95 20 | |
| 1076 | + | anchors.bottom: parent.bottom | |
| 1077 | + | anchors.right: parent.right | |
| 1078 | + | margin-right: 53 | |
| 1079 | + | margin-bottom: 53 |
| @@ -0,0 +1,196 @@ | |||
| 1 | + | UIGameMap = extends(UIMap, "UIGameMap") | |
| 2 | + | ||
| 3 | + | function UIGameMap.create() | |
| 4 | + | local gameMap = UIGameMap.internalCreate() | |
| 5 | + | gameMap:setKeepAspectRatio(true) | |
| 6 | + | gameMap:setVisibleDimension({width = 15, height = 11}) | |
| 7 | + | gameMap:setDrawLights(true) | |
| 8 | + | gameMap.markedThing = nil | |
| 9 | + | gameMap.blockNextRelease = 0 | |
| 10 | + | gameMap:updateMarkedCreature() | |
| 11 | + | return gameMap | |
| 12 | + | end | |
| 13 | + | ||
| 14 | + | function UIGameMap:onDestroy() | |
| 15 | + | if self.updateMarkedCreatureEvent then | |
| 16 | + | removeEvent(self.updateMarkedCreatureEvent) | |
| 17 | + | end | |
| 18 | + | end | |
| 19 | + | ||
| 20 | + | function UIGameMap:markThing(thing, color) | |
| 21 | + | if self.markedThing == thing then | |
| 22 | + | return | |
| 23 | + | end | |
| 24 | + | if self.markedThing then | |
| 25 | + | self.markedThing:setMarked('') | |
| 26 | + | end | |
| 27 | + | ||
| 28 | + | self.markedThing = thing | |
| 29 | + | if self.markedThing and g_settings.getBoolean('highlightThingsUnderCursor') then | |
| 30 | + | self.markedThing:setMarked(color) | |
| 31 | + | end | |
| 32 | + | end | |
| 33 | + | ||
| 34 | + | function UIGameMap:onDragEnter(mousePos) | |
| 35 | + | local tile = self:getTile(mousePos) | |
| 36 | + | if not tile then return false end | |
| 37 | + | ||
| 38 | + | local thing = tile:getTopMoveThing() | |
| 39 | + | if not thing then return false end | |
| 40 | + | ||
| 41 | + | self.currentDragThing = thing | |
| 42 | + | ||
| 43 | + | g_mouse.pushCursor('target') | |
| 44 | + | self.allowNextRelease = false | |
| 45 | + | return true | |
| 46 | + | end | |
| 47 | + | ||
| 48 | + | function UIGameMap:onDragLeave(droppedWidget, mousePos) | |
| 49 | + | self.currentDragThing = nil | |
| 50 | + | self.hoveredWho = nil | |
| 51 | + | g_mouse.popCursor('target') | |
| 52 | + | return true | |
| 53 | + | end | |
| 54 | + | ||
| 55 | + | function UIGameMap:onDrop(widget, mousePos) | |
| 56 | + | if not self:canAcceptDrop(widget, mousePos) then return false end | |
| 57 | + | ||
| 58 | + | local tile = self:getTile(mousePos) | |
| 59 | + | if not tile then return false end | |
| 60 | + | ||
| 61 | + | local thing = widget.currentDragThing | |
| 62 | + | local toPos = tile:getPosition() | |
| 63 | + | ||
| 64 | + | local thingPos = thing:getPosition() | |
| 65 | + | if thingPos.x == toPos.x and thingPos.y == toPos.y and thingPos.z == toPos.z then return false end | |
| 66 | + | ||
| 67 | + | if thing:isItem() and thing:getCount() > 1 then | |
| 68 | + | modules.game_interface.moveStackableItem(thing, toPos) | |
| 69 | + | else | |
| 70 | + | g_game.move(thing, toPos, 1) | |
| 71 | + | end | |
| 72 | + | ||
| 73 | + | return true | |
| 74 | + | end | |
| 75 | + | ||
| 76 | + | function UIGameMap:onMouseMove(mousePos, mouseMoved) | |
| 77 | + | self.mousePos = mousePos | |
| 78 | + | return false | |
| 79 | + | end | |
| 80 | + | ||
| 81 | + | function UIGameMap:onDragMove(mousePos, mouseMoved) | |
| 82 | + | self.mousePos = mousePos | |
| 83 | + | return false | |
| 84 | + | end | |
| 85 | + | ||
| 86 | + | function UIGameMap:updateMarkedCreature() | |
| 87 | + | self.updateMarkedCreatureEvent = scheduleEvent(function() self:updateMarkedCreature() end, 100) | |
| 88 | + | if self.mousePos and g_game.isOnline() then | |
| 89 | + | self.markingMouseRelease = true | |
| 90 | + | self:onMouseRelease(self.mousePos, MouseRightButton) | |
| 91 | + | self.markingMouseRelease = false | |
| 92 | + | end | |
| 93 | + | end | |
| 94 | + | ||
| 95 | + | function UIGameMap:onMousePress() | |
| 96 | + | if not self:isDragging() and self.blockNextRelease < g_clock.millis() then | |
| 97 | + | self.allowNextRelease = true | |
| 98 | + | self.markingMouseRelease = false | |
| 99 | + | end | |
| 100 | + | end | |
| 101 | + | ||
| 102 | + | function UIGameMap:blockNextMouseRelease(postAction) | |
| 103 | + | self.allowNextRelease = false | |
| 104 | + | if postAction then | |
| 105 | + | self.blockNextRelease = g_clock.millis() + 150 | |
| 106 | + | else | |
| 107 | + | self.blockNextRelease = g_clock.millis() + 250 | |
| 108 | + | end | |
| 109 | + | end | |
| 110 | + | ||
| 111 | + | function UIGameMap:onMouseRelease(mousePosition, mouseButton) | |
| 112 | + | if not self.allowNextRelease and not self.markingMouseRelease then | |
| 113 | + | return true | |
| 114 | + | end | |
| 115 | + | local autoWalkPos = self:getPosition(mousePosition) | |
| 116 | + | local positionOffset = self:getPositionOffset(mousePosition) | |
| 117 | + | ||
| 118 | + | -- happens when clicking outside of map boundaries | |
| 119 | + | if not autoWalkPos then | |
| 120 | + | if self.markingMouseRelease then | |
| 121 | + | self:markThing(nil) | |
| 122 | + | end | |
| 123 | + | return false | |
| 124 | + | end | |
| 125 | + | ||
| 126 | + | local localPlayerPos = g_game.getLocalPlayer():getPosition() | |
| 127 | + | if autoWalkPos.z ~= localPlayerPos.z then | |
| 128 | + | local dz = autoWalkPos.z - localPlayerPos.z | |
| 129 | + | autoWalkPos.x = autoWalkPos.x + dz | |
| 130 | + | autoWalkPos.y = autoWalkPos.y + dz | |
| 131 | + | autoWalkPos.z = localPlayerPos.z | |
| 132 | + | end | |
| 133 | + | ||
| 134 | + | local lookThing | |
| 135 | + | local useThing | |
| 136 | + | local creatureThing | |
| 137 | + | local multiUseThing | |
| 138 | + | local attackCreature | |
| 139 | + | ||
| 140 | + | local tile = self:getTile(mousePosition) | |
| 141 | + | if tile then | |
| 142 | + | lookThing = tile:getTopLookThingEx(positionOffset) | |
| 143 | + | useThing = tile:getTopUseThing() | |
| 144 | + | creatureThing = tile:getTopCreatureEx(positionOffset) | |
| 145 | + | end | |
| 146 | + | ||
| 147 | + | local autoWalkTile = g_map.getTile(autoWalkPos) | |
| 148 | + | if autoWalkTile then | |
| 149 | + | attackCreature = autoWalkTile:getTopCreatureEx(positionOffset) | |
| 150 | + | end | |
| 151 | + | ||
| 152 | + | if self.markingMouseRelease then | |
| 153 | + | if attackCreature then | |
| 154 | + | self:markThing(attackCreature, 'yellow') | |
| 155 | + | elseif creatureThing then | |
| 156 | + | self:markThing(creatureThing, 'yellow') | |
| 157 | + | elseif useThing and not useThing:isGround() then | |
| 158 | + | self:markThing(useThing, 'yellow') | |
| 159 | + | elseif lookThing and not lookThing:isGround() then | |
| 160 | + | self:markThing(lookThing, 'yellow') | |
| 161 | + | else | |
| 162 | + | self:markThing(nil, '') | |
| 163 | + | end | |
| 164 | + | return | |
| 165 | + | end | |
| 166 | + | ||
| 167 | + | local ret = modules.game_interface.processMouseAction(mousePosition, mouseButton, autoWalkPos, lookThing, useThing, creatureThing, attackCreature, self.markingMouseRelease) | |
| 168 | + | if ret then | |
| 169 | + | self.allowNextRelease = false | |
| 170 | + | end | |
| 171 | + | ||
| 172 | + | return ret | |
| 173 | + | end | |
| 174 | + | ||
| 175 | + | function UIGameMap:onTouchRelease(mousePosition, mouseButton) | |
| 176 | + | if mouseButton ~= MouseTouch then | |
| 177 | + | return self:onMouseRelease(mousePosition, mouseButton) | |
| 178 | + | end | |
| 179 | + | end | |
| 180 | + | ||
| 181 | + | function UIGameMap:canAcceptDrop(widget, mousePos) | |
| 182 | + | if not widget or not widget.currentDragThing then return false end | |
| 183 | + | ||
| 184 | + | local children = rootWidget:recursiveGetChildrenByPos(mousePos) | |
| 185 | + | for i=1,#children do | |
| 186 | + | local child = children[i] | |
| 187 | + | if child == self then | |
| 188 | + | return true | |
| 189 | + | elseif not child:isPhantom() then | |
| 190 | + | return false | |
| 191 | + | end | |
| 192 | + | end | |
| 193 | + | ||
| 194 | + | error('Widget ' .. self:getId() .. ' not in drop list.') | |
| 195 | + | return false | |
| 196 | + | end |
| @@ -0,0 +1,487 @@ | |||
| 1 | + | Icons = {} | |
| 2 | + | Icons[PlayerStates.Poison] = { tooltip = tr('You are poisoned'), path = '/images/game/states/poisoned', id = 'condition_poisoned' } | |
| 3 | + | Icons[PlayerStates.Burn] = { tooltip = tr('You are burning'), path = '/images/game/states/burning', id = 'condition_burning' } | |
| 4 | + | Icons[PlayerStates.Energy] = { tooltip = tr('You are electrified'), path = '/images/game/states/electrified', id = 'condition_electrified' } | |
| 5 | + | Icons[PlayerStates.Drunk] = { tooltip = tr('You are drunk'), path = '/images/game/states/drunk', id = 'condition_drunk' } | |
| 6 | + | Icons[PlayerStates.ManaShield] = { tooltip = tr('You are protected by a magic shield'), path = '/images/game/states/magic_shield', id = 'condition_magic_shield' } | |
| 7 | + | Icons[PlayerStates.Paralyze] = { tooltip = tr('You are paralysed'), path = '/images/game/states/slowed', id = 'condition_slowed' } | |
| 8 | + | Icons[PlayerStates.Haste] = { tooltip = tr('You are hasted'), path = '/images/game/states/haste', id = 'condition_haste' } | |
| 9 | + | Icons[PlayerStates.Swords] = { tooltip = tr('You may not logout during a fight'), path = '/images/game/states/logout_block', id = 'condition_logout_block' } | |
| 10 | + | Icons[PlayerStates.Drowning] = { tooltip = tr('You are drowning'), path = '/images/game/states/drowning', id = 'condition_drowning' } | |
| 11 | + | Icons[PlayerStates.Freezing] = { tooltip = tr('You are freezing'), path = '/images/game/states/freezing', id = 'condition_freezing' } | |
| 12 | + | Icons[PlayerStates.Dazzled] = { tooltip = tr('You are dazzled'), path = '/images/game/states/dazzled', id = 'condition_dazzled' } | |
| 13 | + | Icons[PlayerStates.Cursed] = { tooltip = tr('You are cursed'), path = '/images/game/states/cursed', id = 'condition_cursed' } | |
| 14 | + | Icons[PlayerStates.PartyBuff] = { tooltip = tr('You are strengthened'), path = '/images/game/states/strengthened', id = 'condition_strengthened' } | |
| 15 | + | Icons[PlayerStates.PzBlock] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/images/game/states/protection_zone_block', id = 'condition_protection_zone_block' } | |
| 16 | + | Icons[PlayerStates.Pz] = { tooltip = tr('You are within a protection zone'), path = '/images/game/states/protection_zone', id = 'condition_protection_zone' } | |
| 17 | + | Icons[PlayerStates.Bleeding] = { tooltip = tr('You are bleeding'), path = '/images/game/states/bleeding', id = 'condition_bleeding' } | |
| 18 | + | Icons[PlayerStates.Hungry] = { tooltip = tr('You are hungry'), path = '/images/game/states/hungry', id = 'condition_hungry' } | |
| 19 | + | ||
| 20 | + | InventorySlotStyles = { | |
| 21 | + | [InventorySlotHead] = "HeadSlot", | |
| 22 | + | [InventorySlotNeck] = "NeckSlot", | |
| 23 | + | [InventorySlotBack] = "BackSlot", | |
| 24 | + | [InventorySlotBody] = "BodySlot", | |
| 25 | + | [InventorySlotRight] = "RightSlot", | |
| 26 | + | [InventorySlotLeft] = "LeftSlot", | |
| 27 | + | [InventorySlotLeg] = "LegSlot", | |
| 28 | + | [InventorySlotFeet] = "FeetSlot", | |
| 29 | + | [InventorySlotFinger] = "FingerSlot", | |
| 30 | + | [InventorySlotAmmo] = "AmmoSlot" | |
| 31 | + | } | |
| 32 | + | ||
| 33 | + | inventoryWindow = nil | |
| 34 | + | inventoryPanel = nil | |
| 35 | + | inventoryButton = nil | |
| 36 | + | purseButton = nil | |
| 37 | + | ||
| 38 | + | combatControlsWindow = nil | |
| 39 | + | fightOffensiveBox = nil | |
| 40 | + | fightBalancedBox = nil | |
| 41 | + | fightDefensiveBox = nil | |
| 42 | + | chaseModeButton = nil | |
| 43 | + | safeFightButton = nil | |
| 44 | + | mountButton = nil | |
| 45 | + | fightModeRadioGroup = nil | |
| 46 | + | buttonPvp = nil | |
| 47 | + | ||
| 48 | + | soulLabel = nil | |
| 49 | + | capLabel = nil | |
| 50 | + | conditionPanel = nil | |
| 51 | + | ||
| 52 | + | function init() | |
| 53 | + | connect(LocalPlayer, { | |
| 54 | + | onInventoryChange = onInventoryChange, | |
| 55 | + | onBlessingsChange = onBlessingsChange | |
| 56 | + | }) | |
| 57 | + | connect(g_game, { onGameStart = refresh }) | |
| 58 | + | ||
| 59 | + | g_keyboard.bindKeyDown('Ctrl+I', toggle) | |
| 60 | + | ||
| 61 | + | ||
| 62 | + | inventoryWindow = g_ui.loadUI('inventory', modules.game_interface.getRightPanel()) | |
| 63 | + | inventoryWindow:disableResize() | |
| 64 | + | inventoryPanel = inventoryWindow:getChildById('contentsPanel'):getChildById('inventoryPanel') | |
| 65 | + | if not inventoryWindow.forceOpen then | |
| 66 | + | --inventoryButton = modules.client_topmenu.addRightGameToggleButton('inventoryButton', tr('Inventory') .. ' (Ctrl+I)', '/images/topbuttons/inventory', toggle) | |
| 67 | + | --inventoryButton:setOn(true) | |
| 68 | + | end | |
| 69 | + | ||
| 70 | + | purseButton = inventoryWindow:recursiveGetChildById('purseButton') | |
| 71 | + | purseButton.onClick = function() | |
| 72 | + | local purse = g_game.getLocalPlayer():getInventoryItem(InventorySlotPurse) | |
| 73 | + | if purse then | |
| 74 | + | g_game.use(purse) | |
| 75 | + | end | |
| 76 | + | end | |
| 77 | + | ||
| 78 | + | -- controls | |
| 79 | + | fightOffensiveBox = inventoryWindow:recursiveGetChildById('fightOffensiveBox') | |
| 80 | + | fightBalancedBox = inventoryWindow:recursiveGetChildById('fightBalancedBox') | |
| 81 | + | fightDefensiveBox = inventoryWindow:recursiveGetChildById('fightDefensiveBox') | |
| 82 | + | ||
| 83 | + | chaseModeButton = inventoryWindow:recursiveGetChildById('chaseModeBox') | |
| 84 | + | safeFightButton = inventoryWindow:recursiveGetChildById('safeFightBox') | |
| 85 | + | buttonPvp = inventoryWindow:recursiveGetChildById('buttonPvp') | |
| 86 | + | ||
| 87 | + | mountButton = inventoryWindow:recursiveGetChildById('mountButton') | |
| 88 | + | mountButton.onClick = onMountButtonClick | |
| 89 | + | ||
| 90 | + | whiteDoveBox = inventoryWindow:recursiveGetChildById('whiteDoveBox') | |
| 91 | + | whiteHandBox = inventoryWindow:recursiveGetChildById('whiteHandBox') | |
| 92 | + | yellowHandBox = inventoryWindow:recursiveGetChildById('yellowHandBox') | |
| 93 | + | redFistBox = inventoryWindow:recursiveGetChildById('redFistBox') | |
| 94 | + | ||
| 95 | + | fightModeRadioGroup = UIRadioGroup.create() | |
| 96 | + | fightModeRadioGroup:addWidget(fightOffensiveBox) | |
| 97 | + | fightModeRadioGroup:addWidget(fightBalancedBox) | |
| 98 | + | fightModeRadioGroup:addWidget(fightDefensiveBox) | |
| 99 | + | ||
| 100 | + | connect(fightModeRadioGroup, { onSelectionChange = onSetFightMode }) | |
| 101 | + | connect(chaseModeButton, { onCheckChange = onSetChaseMode }) | |
| 102 | + | connect(safeFightButton, { onCheckChange = onSetSafeFight }) | |
| 103 | + | if buttonPvp then | |
| 104 | + | connect(buttonPvp, { onClick = onSetSafeFight2 }) | |
| 105 | + | end | |
| 106 | + | connect(g_game, { | |
| 107 | + | onGameStart = online, | |
| 108 | + | onGameEnd = offline, | |
| 109 | + | onFightModeChange = update, | |
| 110 | + | onChaseModeChange = update, | |
| 111 | + | onSafeFightChange = update, | |
| 112 | + | onPVPModeChange = update, | |
| 113 | + | onWalk = check, | |
| 114 | + | onAutoWalk = check | |
| 115 | + | }) | |
| 116 | + | ||
| 117 | + | connect(LocalPlayer, { onOutfitChange = onOutfitChange }) | |
| 118 | + | ||
| 119 | + | if g_game.isOnline() then | |
| 120 | + | online() | |
| 121 | + | end | |
| 122 | + | -- controls end | |
| 123 | + | ||
| 124 | + | -- status | |
| 125 | + | soulLabel = inventoryWindow:recursiveGetChildById('soulLabel') | |
| 126 | + | capLabel = inventoryWindow:recursiveGetChildById('capLabel') | |
| 127 | + | conditionPanel = inventoryWindow:recursiveGetChildById('conditionPanel') | |
| 128 | + | ||
| 129 | + | ||
| 130 | + | connect(LocalPlayer, { onStatesChange = onStatesChange, | |
| 131 | + | onSoulChange = onSoulChange, | |
| 132 | + | onFreeCapacityChange = onFreeCapacityChange }) | |
| 133 | + | -- status end | |
| 134 | + | ||
| 135 | + | refresh() | |
| 136 | + | inventoryWindow:setup() | |
| 137 | + | end | |
| 138 | + | ||
| 139 | + | function terminate() | |
| 140 | + | disconnect(LocalPlayer, { | |
| 141 | + | onInventoryChange = onInventoryChange, | |
| 142 | + | onBlessingsChange = onBlessingsChange | |
| 143 | + | }) | |
| 144 | + | disconnect(g_game, { onGameStart = refresh }) | |
| 145 | + | ||
| 146 | + | g_keyboard.unbindKeyDown('Ctrl+I') | |
| 147 | + | ||
| 148 | + | -- controls | |
| 149 | + | if g_game.isOnline() then | |
| 150 | + | offline() | |
| 151 | + | end | |
| 152 | + | ||
| 153 | + | fightModeRadioGroup:destroy() | |
| 154 | + | ||
| 155 | + | disconnect(g_game, { | |
| 156 | + | onGameStart = online, | |
| 157 | + | onGameEnd = offline, | |
| 158 | + | onFightModeChange = update, | |
| 159 | + | onChaseModeChange = update, | |
| 160 | + | onSafeFightChange = update, | |
| 161 | + | onPVPModeChange = update, | |
| 162 | + | onWalk = check, | |
| 163 | + | onAutoWalk = check | |
| 164 | + | }) | |
| 165 | + | ||
| 166 | + | disconnect(LocalPlayer, { onOutfitChange = onOutfitChange }) | |
| 167 | + | -- controls end | |
| 168 | + | -- status | |
| 169 | + | disconnect(LocalPlayer, { onStatesChange = onStatesChange, | |
| 170 | + | onSoulChange = onSoulChange, | |
| 171 | + | onFreeCapacityChange = onFreeCapacityChange }) | |
| 172 | + | -- status end | |
| 173 | + | ||
| 174 | + | inventoryWindow:destroy() | |
| 175 | + | --if inventoryButton then | |
| 176 | + | -- inventoryButton:destroy() | |
| 177 | + | --end | |
| 178 | + | end | |
| 179 | + | ||
| 180 | + | function toggleAdventurerStyle(hasBlessing) | |
| 181 | + | for slot = InventorySlotFirst, InventorySlotLast do | |
| 182 | + | local itemWidget = inventoryPanel:getChildById('slot' .. slot) | |
| 183 | + | if itemWidget then | |
| 184 | + | itemWidget:setOn(hasBlessing) | |
| 185 | + | end | |
| 186 | + | end | |
| 187 | + | end | |
| 188 | + | ||
| 189 | + | function refresh() | |
| 190 | + | local player = g_game.getLocalPlayer() | |
| 191 | + | for i = InventorySlotFirst, InventorySlotPurse do | |
| 192 | + | if g_game.isOnline() then | |
| 193 | + | onInventoryChange(player, i, player:getInventoryItem(i)) | |
| 194 | + | else | |
| 195 | + | onInventoryChange(player, i, nil) | |
| 196 | + | end | |
| 197 | + | toggleAdventurerStyle(player and Bit.hasBit(player:getBlessings(), Blessings.Adventurer) or false) | |
| 198 | + | end | |
| 199 | + | if player then | |
| 200 | + | onSoulChange(player, player:getSoul()) | |
| 201 | + | onFreeCapacityChange(player, player:getFreeCapacity()) | |
| 202 | + | onStatesChange(player, player:getStates(), 0) | |
| 203 | + | end | |
| 204 | + | ||
| 205 | + | purseButton:setVisible(g_game.getFeature(GamePurseSlot)) | |
| 206 | + | end | |
| 207 | + | ||
| 208 | + | function toggle() | |
| 209 | + | --if not inventoryButton then | |
| 210 | + | -- return | |
| 211 | + | --end | |
| 212 | + | --if inventoryButton:isOn() then | |
| 213 | + | -- inventoryWindow:close() | |
| 214 | + | -- inventoryButton:setOn(false) | |
| 215 | + | --else | |
| 216 | + | -- inventoryWindow:open() | |
| 217 | + | -- inventoryButton:setOn(true) | |
| 218 | + | --end | |
| 219 | + | end | |
| 220 | + | ||
| 221 | + | function onMiniWindowClose() | |
| 222 | + | --if not inventoryButton then | |
| 223 | + | -- return | |
| 224 | + | --end | |
| 225 | + | --inventoryButton:setOn(false) | |
| 226 | + | end | |
| 227 | + | ||
| 228 | + | -- hooked events | |
| 229 | + | function onInventoryChange(player, slot, item, oldItem) | |
| 230 | + | if slot > InventorySlotPurse then return end | |
| 231 | + | ||
| 232 | + | if slot == InventorySlotPurse then | |
| 233 | + | if g_game.getFeature(GamePurseSlot) then | |
| 234 | + | --purseButton:setEnabled(item and true or false) | |
| 235 | + | end | |
| 236 | + | return | |
| 237 | + | end | |
| 238 | + | ||
| 239 | + | local itemWidget = inventoryPanel:getChildById('slot' .. slot) | |
| 240 | + | if item then | |
| 241 | + | itemWidget:setStyle('InventoryItem') | |
| 242 | + | itemWidget:setItem(item) | |
| 243 | + | else | |
| 244 | + | itemWidget:setStyle(InventorySlotStyles[slot]) | |
| 245 | + | itemWidget:setItem(nil) | |
| 246 | + | end | |
| 247 | + | end | |
| 248 | + | ||
| 249 | + | function onBlessingsChange(player, blessings, oldBlessings) | |
| 250 | + | local hasAdventurerBlessing = Bit.hasBit(blessings, Blessings.Adventurer) | |
| 251 | + | if hasAdventurerBlessing ~= Bit.hasBit(oldBlessings, Blessings.Adventurer) then | |
| 252 | + | toggleAdventurerStyle(hasAdventurerBlessing) | |
| 253 | + | end | |
| 254 | + | end | |
| 255 | + | ||
| 256 | + | ||
| 257 | + | -- controls | |
| 258 | + | function update() | |
| 259 | + | local fightMode = g_game.getFightMode() | |
| 260 | + | if fightMode == FightOffensive then | |
| 261 | + | fightModeRadioGroup:selectWidget(fightOffensiveBox) | |
| 262 | + | elseif fightMode == FightBalanced then | |
| 263 | + | fightModeRadioGroup:selectWidget(fightBalancedBox) | |
| 264 | + | else | |
| 265 | + | fightModeRadioGroup:selectWidget(fightDefensiveBox) | |
| 266 | + | end | |
| 267 | + | ||
| 268 | + | local chaseMode = g_game.getChaseMode() | |
| 269 | + | chaseModeButton:setChecked(chaseMode == ChaseOpponent) | |
| 270 | + | ||
| 271 | + | local safeFight = g_game.isSafeFight() | |
| 272 | + | safeFightButton:setChecked(not safeFight) | |
| 273 | + | if buttonPvp then | |
| 274 | + | if safeFight then | |
| 275 | + | buttonPvp:setOn(false) | |
| 276 | + | else | |
| 277 | + | buttonPvp:setOn(true) | |
| 278 | + | end | |
| 279 | + | end | |
| 280 | + | ||
| 281 | + | if g_game.getFeature(GamePVPMode) then | |
| 282 | + | local pvpMode = g_game.getPVPMode() | |
| 283 | + | local pvpWidget = getPVPBoxByMode(pvpMode) | |
| 284 | + | end | |
| 285 | + | end | |
| 286 | + | ||
| 287 | + | function check() | |
| 288 | + | if modules.client_options.getOption('autoChaseOverride') then | |
| 289 | + | if g_game.isAttacking() and g_game.getChaseMode() == ChaseOpponent then | |
| 290 | + | g_game.setChaseMode(DontChase) | |
| 291 | + | end | |
| 292 | + | end | |
| 293 | + | end | |
| 294 | + | ||
| 295 | + | function online() | |
| 296 | + | local player = g_game.getLocalPlayer() | |
| 297 | + | if player then | |
| 298 | + | local char = g_game.getCharacterName() | |
| 299 | + | ||
| 300 | + | local lastCombatControls = g_settings.getNode('LastCombatControls') | |
| 301 | + | ||
| 302 | + | if not table.empty(lastCombatControls) then | |
| 303 | + | if lastCombatControls[char] then | |
| 304 | + | g_game.setFightMode(lastCombatControls[char].fightMode) | |
| 305 | + | g_game.setChaseMode(lastCombatControls[char].chaseMode) | |
| 306 | + | g_game.setSafeFight(lastCombatControls[char].safeFight) | |
| 307 | + | if lastCombatControls[char].pvpMode then | |
| 308 | + | g_game.setPVPMode(lastCombatControls[char].pvpMode) | |
| 309 | + | end | |
| 310 | + | end | |
| 311 | + | end | |
| 312 | + | ||
| 313 | + | if g_game.getFeature(GamePlayerMounts) then | |
| 314 | + | mountButton:setVisible(true) | |
| 315 | + | mountButton:setChecked(player:isMounted()) | |
| 316 | + | else | |
| 317 | + | mountButton:setVisible(false) | |
| 318 | + | end | |
| 319 | + | end | |
| 320 | + | ||
| 321 | + | update() | |
| 322 | + | end | |
| 323 | + | ||
| 324 | + | function offline() | |
| 325 | + | local lastCombatControls = g_settings.getNode('LastCombatControls') | |
| 326 | + | if not lastCombatControls then | |
| 327 | + | lastCombatControls = {} | |
| 328 | + | end | |
| 329 | + | ||
| 330 | + | conditionPanel:destroyChildren() | |
| 331 | + | ||
| 332 | + | local player = g_game.getLocalPlayer() | |
| 333 | + | if player then | |
| 334 | + | local char = g_game.getCharacterName() | |
| 335 | + | lastCombatControls[char] = { | |
| 336 | + | fightMode = g_game.getFightMode(), | |
| 337 | + | chaseMode = g_game.getChaseMode(), | |
| 338 | + | safeFight = g_game.isSafeFight() | |
| 339 | + | } | |
| 340 | + | ||
| 341 | + | if g_game.getFeature(GamePVPMode) then | |
| 342 | + | lastCombatControls[char].pvpMode = g_game.getPVPMode() | |
| 343 | + | end | |
| 344 | + | ||
| 345 | + | -- save last combat control settings | |
| 346 | + | g_settings.setNode('LastCombatControls', lastCombatControls) | |
| 347 | + | end | |
| 348 | + | end | |
| 349 | + | ||
| 350 | + | function onSetFightMode(self, selectedFightButton) | |
| 351 | + | if selectedFightButton == nil then return end | |
| 352 | + | local buttonId = selectedFightButton:getId() | |
| 353 | + | local fightMode | |
| 354 | + | if buttonId == 'fightOffensiveBox' then | |
| 355 | + | fightMode = FightOffensive | |
| 356 | + | elseif buttonId == 'fightBalancedBox' then | |
| 357 | + | fightMode = FightBalanced | |
| 358 | + | else | |
| 359 | + | fightMode = FightDefensive | |
| 360 | + | end | |
| 361 | + | g_game.setFightMode(fightMode) | |
| 362 | + | end | |
| 363 | + | ||
| 364 | + | function onSetChaseMode(self, checked) | |
| 365 | + | local chaseMode | |
| 366 | + | if checked then | |
| 367 | + | chaseMode = ChaseOpponent | |
| 368 | + | else | |
| 369 | + | chaseMode = DontChase | |
| 370 | + | end | |
| 371 | + | g_game.setChaseMode(chaseMode) | |
| 372 | + | end | |
| 373 | + | ||
| 374 | + | function onSetSafeFight(self, checked) | |
| 375 | + | g_game.setSafeFight(not checked) | |
| 376 | + | if buttonPvp then | |
| 377 | + | if not checked then | |
| 378 | + | buttonPvp:setOn(false) | |
| 379 | + | else | |
| 380 | + | buttonPvp:setOn(true) | |
| 381 | + | end | |
| 382 | + | end | |
| 383 | + | end | |
| 384 | + | ||
| 385 | + | function onSetSafeFight2(self) | |
| 386 | + | onSetSafeFight(self, not safeFightButton:isChecked()) | |
| 387 | + | end | |
| 388 | + | ||
| 389 | + | function onSetPVPMode(self, selectedPVPButton) | |
| 390 | + | if selectedPVPButton == nil then | |
| 391 | + | return | |
| 392 | + | end | |
| 393 | + | ||
| 394 | + | local buttonId = selectedPVPButton:getId() | |
| 395 | + | local pvpMode = PVPWhiteDove | |
| 396 | + | if buttonId == 'whiteDoveBox' then | |
| 397 | + | pvpMode = PVPWhiteDove | |
| 398 | + | elseif buttonId == 'whiteHandBox' then | |
| 399 | + | pvpMode = PVPWhiteHand | |
| 400 | + | elseif buttonId == 'yellowHandBox' then | |
| 401 | + | pvpMode = PVPYellowHand | |
| 402 | + | elseif buttonId == 'redFistBox' then | |
| 403 | + | pvpMode = PVPRedFist | |
| 404 | + | end | |
| 405 | + | ||
| 406 | + | g_game.setPVPMode(pvpMode) | |
| 407 | + | end | |
| 408 | + | ||
| 409 | + | function onMountButtonClick(self, mousePos) | |
| 410 | + | local player = g_game.getLocalPlayer() | |
| 411 | + | if player then | |
| 412 | + | player:toggleMount() | |
| 413 | + | end | |
| 414 | + | end | |
| 415 | + | ||
| 416 | + | function onOutfitChange(localPlayer, outfit, oldOutfit) | |
| 417 | + | if outfit.mount == oldOutfit.mount then | |
| 418 | + | return | |
| 419 | + | end | |
| 420 | + | ||
| 421 | + | mountButton:setChecked(outfit.mount ~= nil and outfit.mount > 0) | |
| 422 | + | end | |
| 423 | + | ||
| 424 | + | function getPVPBoxByMode(mode) | |
| 425 | + | local widget = nil | |
| 426 | + | if mode == PVPWhiteDove then | |
| 427 | + | widget = whiteDoveBox | |
| 428 | + | elseif mode == PVPWhiteHand then | |
| 429 | + | widget = whiteHandBox | |
| 430 | + | elseif mode == PVPYellowHand then | |
| 431 | + | widget = yellowHandBox | |
| 432 | + | elseif mode == PVPRedFist then | |
| 433 | + | widget = redFistBox | |
| 434 | + | end | |
| 435 | + | return widget | |
| 436 | + | end | |
| 437 | + | ||
| 438 | + | -- status | |
| 439 | + | function toggleIcon(bitChanged) | |
| 440 | + | local icon = conditionPanel:getChildById(Icons[bitChanged].id) | |
| 441 | + | if icon then | |
| 442 | + | icon:destroy() | |
| 443 | + | else | |
| 444 | + | icon = loadIcon(bitChanged) | |
| 445 | + | icon:setParent(conditionPanel) | |
| 446 | + | end | |
| 447 | + | end | |
| 448 | + | ||
| 449 | + | function loadIcon(bitChanged) | |
| 450 | + | local icon = g_ui.createWidget('ConditionWidget', conditionPanel) | |
| 451 | + | icon:setId(Icons[bitChanged].id) | |
| 452 | + | icon:setImageSource(Icons[bitChanged].path) | |
| 453 | + | icon:setTooltip(Icons[bitChanged].tooltip) | |
| 454 | + | return icon | |
| 455 | + | end | |
| 456 | + | ||
| 457 | + | function onSoulChange(localPlayer, soul) | |
| 458 | + | if not soul then return end | |
| 459 | + | soulLabel:setText(tr('Soul') .. ':\n' .. soul) | |
| 460 | + | end | |
| 461 | + | ||
| 462 | + | function onFreeCapacityChange(player, freeCapacity) | |
| 463 | + | if not freeCapacity then return end | |
| 464 | + | if freeCapacity > 99 then | |
| 465 | + | freeCapacity = math.floor(freeCapacity * 10) / 10 | |
| 466 | + | end | |
| 467 | + | if freeCapacity > 999 then | |
| 468 | + | freeCapacity = math.floor(freeCapacity) | |
| 469 | + | end | |
| 470 | + | if freeCapacity > 99999 then | |
| 471 | + | freeCapacity = math.min(9999, math.floor(freeCapacity/1000)) .. "k" | |
| 472 | + | end | |
| 473 | + | capLabel:setText(tr('Cap') .. ':\n' .. freeCapacity) | |
| 474 | + | end | |
| 475 | + | ||
| 476 | + | function onStatesChange(localPlayer, now, old) | |
| 477 | + | if now == old then return end | |
| 478 | + | local bitsChanged = bit32.bxor(now, old) | |
| 479 | + | for i = 1, 32 do | |
| 480 | + | local pow = math.pow(2, i-1) | |
| 481 | + | if pow > bitsChanged then break end | |
| 482 | + | local bitChanged = bit32.band(bitsChanged, pow) | |
| 483 | + | if bitChanged ~= 0 then | |
| 484 | + | toggleIcon(bitChanged) | |
| 485 | + | end | |
| 486 | + | end | |
| 487 | + | end |
| @@ -0,0 +1,9 @@ | |||
| 1 | + | Module | |
| 2 | + | name: game_inventory | |
| 3 | + | description: View local player equipments window | |
| 4 | + | author: baxnie, edubart, BeniS, otclientv8 | |
| 5 | + | website: https://github.com/edubart/otclient | |
| 6 | + | sandboxed: true | |
| 7 | + | scripts: [ inventory ] | |
| 8 | + | @onLoad: init() | |
| 9 | + | @onUnload: terminate() |
| @@ -0,0 +1,7 @@ | |||
| 1 | + | InventoryWindow | |
| 2 | + | id: inventoryWindow | |
| 3 | + | !text: tr('Inventory') | |
| 4 | + | @onClose: modules.game_inventory.onMiniWindowClose() | |
| 5 | + | visible: false | |
| 6 | + | &save: true | |
| 7 | + | &autoOpen: 3 |
| @@ -0,0 +1,74 @@ | |||
| 1 | + | local activeWindow | |
| 2 | + | ||
| 3 | + | function init() | |
| 4 | + | g_ui.importStyle('itemselector') | |
| 5 | + | ||
| 6 | + | connect(g_game, { onGameEnd = destroyWindow }) | |
| 7 | + | end | |
| 8 | + | ||
| 9 | + | function terminate() | |
| 10 | + | disconnect(g_game, { onGameEnd = destroyWindow }) | |
| 11 | + | ||
| 12 | + | destroyWindow() | |
| 13 | + | end | |
| 14 | + | ||
| 15 | + | function destroyWindow() | |
| 16 | + | if activeWindow then | |
| 17 | + | activeWindow:destroy() | |
| 18 | + | activeWindow = nil | |
| 19 | + | end | |
| 20 | + | end | |
| 21 | + | ||
| 22 | + | function show(itemWidget) | |
| 23 | + | if not itemWidget then | |
| 24 | + | return | |
| 25 | + | end | |
| 26 | + | if activeWindow then | |
| 27 | + | destroyWindow() | |
| 28 | + | end | |
| 29 | + | local window = g_ui.createWidget('ItemSelectorWindow', rootWidget) | |
| 30 | + | ||
| 31 | + | local destroy = function() | |
| 32 | + | window:destroy() | |
| 33 | + | if window == activeWindow then | |
| 34 | + | activeWindow = nil | |
| 35 | + | end | |
| 36 | + | end | |
| 37 | + | local doneFunc = function() | |
| 38 | + | itemWidget:setItem(Item.create(window.item:getItemId(), window.item:getItemCount())) | |
| 39 | + | destroy() | |
| 40 | + | end | |
| 41 | + | local clearFunc = function() | |
| 42 | + | window.item:setItemId(0) | |
| 43 | + | window.item:setItemCount(0) | |
| 44 | + | doneFunc() | |
| 45 | + | end | |
| 46 | + | ||
| 47 | + | window.clearButton.onClick = clearFunc | |
| 48 | + | window.okButton.onClick = doneFunc | |
| 49 | + | window.cancelButton.onClick = destroy | |
| 50 | + | window.onEnter = doneFunc | |
| 51 | + | window.onEscape = destroy | |
| 52 | + | ||
| 53 | + | window.item:setItem(Item.create(itemWidget:getItemId(), itemWidget:getItemCount())) | |
| 54 | + | ||
| 55 | + | window.itemId:setValue(itemWidget:getItemId()) | |
| 56 | + | if itemWidget:getItemCount() > 1 then | |
| 57 | + | window.itemCount:setValue(itemWidget:getItemCount()) | |
| 58 | + | end | |
| 59 | + | ||
| 60 | + | window.itemId.onValueChange = function(widget, value) | |
| 61 | + | window.item:setItemId(value) | |
| 62 | + | end | |
| 63 | + | window.itemCount.onValueChange = function(widget, value) | |
| 64 | + | window.item:setItemCount(value) | |
| 65 | + | end | |
| 66 | + | ||
| 67 | + | activeWindow = window | |
| 68 | + | activeWindow:raise() | |
| 69 | + | activeWindow:focus() | |
| 70 | + | end | |
| 71 | + | ||
| 72 | + | function hide() | |
| 73 | + | destroyWindow() | |
| 74 | + | end |
| @@ -0,0 +1,10 @@ | |||
| 1 | + | Module | |
| 2 | + | name: game_itemselector | |
| 3 | + | description: Allow to select item | |
| 4 | + | author: OTClientV8 | |
| 5 | + | website: https://github.com/OTCv8/otclientv8 | |
| 6 | + | sandboxed: true | |
| 7 | + | dependencies: [ game_interface ] | |
| 8 | + | scripts: [ itemselector ] | |
| 9 | + | @onLoad: init() | |
| 10 | + | @onUnload: terminate() |
| @@ -0,0 +1,72 @@ | |||
| 1 | + | ItemSelectorWindow < MainWindow | |
| 2 | + | id: itemSelector | |
| 3 | + | size: 260 120 | |
| 4 | + | !text: tr("Select item") | |
| 5 | + | ||
| 6 | + | Item | |
| 7 | + | id: item | |
| 8 | + | virtual: true | |
| 9 | + | size: 32 32 | |
| 10 | + | margin-top: 10 | |
| 11 | + | anchors.top: parent.top | |
| 12 | + | anchors.left: parent.left | |
| 13 | + | ||
| 14 | + | SpinBox | |
| 15 | + | id: itemId | |
| 16 | + | anchors.top: parent.top | |
| 17 | + | anchors.left: prev.right | |
| 18 | + | margin-top: 15 | |
| 19 | + | margin-left: 5 | |
| 20 | + | padding-left: 5 | |
| 21 | + | width: 70 | |
| 22 | + | minimum: 0 | |
| 23 | + | maximum: 999999 | |
| 24 | + | focusable: true | |
| 25 | + | ||
| 26 | + | Label | |
| 27 | + | anchors.top: parent.top | |
| 28 | + | anchors.left: prev.left | |
| 29 | + | anchors.right: prev.right | |
| 30 | + | text-align: center | |
| 31 | + | !text: tr("Item ID") | |
| 32 | + | ||
| 33 | + | SpinBox | |
| 34 | + | id: itemCount | |
| 35 | + | anchors.top: parent.top | |
| 36 | + | anchors.left: prev.right | |
| 37 | + | margin-top: 15 | |
| 38 | + | margin-left: 5 | |
| 39 | + | padding-left: 5 | |
| 40 | + | width: 120 | |
| 41 | + | minimum: 1 | |
| 42 | + | maximum: 100 | |
| 43 | + | focusable: true | |
| 44 | + | ||
| 45 | + | Label | |
| 46 | + | anchors.top: parent.top | |
| 47 | + | anchors.left: prev.left | |
| 48 | + | anchors.right: prev.right | |
| 49 | + | text-align: center | |
| 50 | + | !text: tr("Count / SubType") | |
| 51 | + | ||
| 52 | + | Button | |
| 53 | + | id: clearButton | |
| 54 | + | !text: tr('Clear') | |
| 55 | + | anchors.bottom: parent.bottom | |
| 56 | + | anchors.left: parent.left | |
| 57 | + | width: 60 | |
| 58 | + | ||
| 59 | + | Button | |
| 60 | + | id: okButton | |
| 61 | + | !text: tr('Ok') | |
| 62 | + | anchors.bottom: parent.bottom | |
| 63 | + | anchors.right: next.left | |
| 64 | + | margin-right: 10 | |
| 65 | + | width: 60 | |
| 66 | + | ||
| 67 | + | Button | |
| 68 | + | id: cancelButton | |
| 69 | + | !text: tr('Cancel') | |
| 70 | + | anchors.bottom: parent.bottom | |
| 71 | + | anchors.right: parent.right | |
| 72 | + | width: 60 |