mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
new widget, UICheckBox
This commit is contained in:
@@ -41,7 +41,7 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 9
|
||||
margin.right: 9
|
||||
onClick: About.openWebpage()
|
||||
@onClick: About.openWebpage()
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
@@ -58,4 +58,4 @@ MainWindow
|
||||
anchors.top: parent.top
|
||||
margin.top: 191
|
||||
margin.left: 188
|
||||
onClick: About.destroy()
|
||||
@onClick: About.destroy()
|
||||
|
@@ -11,6 +11,7 @@ Module
|
||||
importStyles 'styles/panels.otui'
|
||||
importStyles 'styles/separators.otui'
|
||||
importStyles 'styles/lineedits.otui'
|
||||
importStyles 'styles/checkboxes.otui'
|
||||
importStyles 'styles/windows.otui'
|
||||
importStyles 'styles/listboxes.otui'
|
||||
importStyles 'styles/items.otui'
|
||||
|
@@ -8,18 +8,18 @@ Button < UIButton
|
||||
source: /core_styles/images/button.png
|
||||
border: 5
|
||||
|
||||
state.hover:
|
||||
$hover:
|
||||
border-image:
|
||||
source: /core_styles/images/button_hover.png
|
||||
border: 5
|
||||
|
||||
state.pressed:
|
||||
$pressed:
|
||||
text-translate: 1 1
|
||||
border-image:
|
||||
source: /core_styles/images/button_down.png
|
||||
border: 5
|
||||
|
||||
state.disabled:
|
||||
$disabled:
|
||||
color: #999999
|
||||
background-color: #ffffff88
|
||||
|
||||
@@ -32,14 +32,14 @@ TopButton < UIButton
|
||||
size: 26 25
|
||||
border: 3
|
||||
|
||||
state.hover:
|
||||
$hover:
|
||||
border-image:
|
||||
source: /core_styles/images/top_button.png
|
||||
size: 26 25
|
||||
offset: 26 0
|
||||
border: 3
|
||||
|
||||
state.pressed:
|
||||
$pressed:
|
||||
text-translate: 1 1
|
||||
border-image:
|
||||
source: /core_styles/images/top_button.png
|
||||
@@ -47,7 +47,7 @@ TopButton < UIButton
|
||||
offset: 52 0
|
||||
border: 3
|
||||
|
||||
state.disabled:
|
||||
$disabled:
|
||||
background-color: #ffffff66
|
||||
|
||||
MenuButton < UIButton
|
||||
@@ -58,7 +58,7 @@ MenuButton < UIButton
|
||||
source: /core_styles/images/menu.png
|
||||
size: 64 24
|
||||
|
||||
state.hover:
|
||||
$hover:
|
||||
border-image:
|
||||
source: /core_styles/images/menu.png
|
||||
offset: 0 24
|
||||
|
@@ -12,7 +12,7 @@ Window < UIWindow
|
||||
border: 4
|
||||
border.top: 20
|
||||
|
||||
state.pressed:
|
||||
$pressed:
|
||||
opacity: 192
|
||||
|
||||
MiniWindow < UIWindow
|
||||
|
@@ -8,7 +8,7 @@ CharacterListLabel < Label
|
||||
margin.right: 1
|
||||
margin.top: 1
|
||||
|
||||
state.focus:
|
||||
$focus:
|
||||
background-color: #ffffff22
|
||||
color: #ffffff
|
||||
|
||||
@@ -55,7 +55,7 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: CharacterList.doLogin()
|
||||
@onClick: CharacterList.doLogin()
|
||||
|
||||
Button
|
||||
id: buttonCancel
|
||||
@@ -65,4 +65,4 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: CharacterList.destroy()
|
||||
@onClick: CharacterList.destroy()
|
@@ -1,7 +1,7 @@
|
||||
MainWindow
|
||||
id: enterGame
|
||||
title: Enter Game
|
||||
size: 236 160
|
||||
size: 236 200
|
||||
onEnter: EnterGame.doLogin()
|
||||
onEscape: EnterGame.hide()
|
||||
|
||||
@@ -38,6 +38,27 @@ MainWindow
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
CheckBox
|
||||
id: rememberPasswordBox
|
||||
text: Remember password
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin.top: 10
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
CheckBox
|
||||
id: autoLoginBox
|
||||
text: Auto login
|
||||
checked: true
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin.top: 8
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
Button
|
||||
text: Ok
|
||||
width: 64
|
||||
@@ -45,7 +66,7 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: EnterGame.doLogin()
|
||||
@onClick: EnterGame.doLogin()
|
||||
|
||||
Button
|
||||
text: Cancel
|
||||
@@ -54,4 +75,4 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: EnterGame.hide()
|
||||
@onClick: EnterGame.hide()
|
||||
|
@@ -17,10 +17,9 @@ local InventorySlotAmmo = 10
|
||||
-- public functions
|
||||
function Inventory.create()
|
||||
window = loadUI("/inventory/inventory.otui", Game.gameRightPanel)
|
||||
|
||||
|
||||
local itemWidget = window:getChildById('feet')
|
||||
window:setHeight(itemWidget:getPosition().y + itemWidget:getHeight() - window:getPosition().y)
|
||||
|
||||
end
|
||||
|
||||
function Inventory.destroy()
|
||||
@@ -52,7 +51,7 @@ function Inventory.onInventoryChange(slot, item)
|
||||
elseif slot == InventorySlotAmmo then
|
||||
slotId = 'ammo'
|
||||
end
|
||||
|
||||
|
||||
local itemWidget = window:getChildById(slotId)
|
||||
itemWidget:setItem(item)
|
||||
end
|
||||
|
@@ -7,4 +7,4 @@ Panel
|
||||
|
||||
MenuButton
|
||||
text: Quit
|
||||
onClick: exit()
|
||||
@onClick: exit()
|
@@ -10,7 +10,7 @@ MainWindow
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 32
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
@onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: |-
|
||||
@@ -28,7 +28,7 @@ MainWindow
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 65
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
@onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: |-
|
||||
@@ -46,7 +46,7 @@ MainWindow
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 98
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
@onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: Customise the console
|
||||
@@ -62,7 +62,7 @@ MainWindow
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 131
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
@onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: Edit your hotkey texts
|
||||
@@ -86,7 +86,7 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 18
|
||||
margin.bottom: 60
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
@onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
Label
|
||||
text: |-
|
||||
@@ -113,4 +113,4 @@ MainWindow
|
||||
anchors.bottom: parent.bottom
|
||||
margin.right: 10
|
||||
margin.bottom: 10
|
||||
onClick: Options.destroy()
|
||||
@onClick: Options.destroy()
|
@@ -12,7 +12,7 @@ Window
|
||||
margin.left: 20
|
||||
|
||||
Button
|
||||
onClick: Outfit.previousType()
|
||||
@onClick: Outfit.previousType()
|
||||
text: <<
|
||||
width: 32
|
||||
margin.top: 3
|
||||
@@ -20,7 +20,7 @@ Window
|
||||
anchors.left: creature.left
|
||||
|
||||
Button
|
||||
onClick: Outfit.nextType()
|
||||
@onClick: Outfit.nextType()
|
||||
text: >>
|
||||
width: 32
|
||||
margin.top: 3
|
||||
@@ -43,7 +43,7 @@ Window
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: Outfit.accept()
|
||||
@onClick: Outfit.accept()
|
||||
|
||||
Button
|
||||
id: buttonCancel
|
||||
@@ -53,4 +53,4 @@ Window
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 16
|
||||
margin.right: 16
|
||||
onClick: Outfit.destroy()
|
||||
@onClick: Outfit.destroy()
|
||||
|
@@ -12,7 +12,7 @@ TopPanel
|
||||
margin.top: 4
|
||||
margin.left: 6
|
||||
tooltip: Options
|
||||
onClick: Options.create()
|
||||
@onClick: Options.create()
|
||||
|
||||
UIWidget
|
||||
size: 16 16
|
||||
@@ -25,7 +25,7 @@ TopPanel
|
||||
anchors.left: prev.right
|
||||
margin.left: 6
|
||||
tooltip: Enter game with a character
|
||||
onClick: |
|
||||
@onClick: |
|
||||
if Game.isOnline() then
|
||||
CharacterList.show()
|
||||
else
|
||||
@@ -44,7 +44,7 @@ TopPanel
|
||||
margin.top: 4
|
||||
margin.right: 6
|
||||
tooltip: Logout
|
||||
onClick: |
|
||||
@onClick: |
|
||||
if Game.isOnline() then
|
||||
Game.logout(false)
|
||||
else
|
||||
@@ -63,7 +63,7 @@ TopPanel
|
||||
margin.top: 4
|
||||
margin.right: 6
|
||||
tooltip: About OTClient
|
||||
onClick: About.create()
|
||||
@onClick: About.create()
|
||||
|
||||
UIWidget
|
||||
size: 16 16
|
||||
|
Reference in New Issue
Block a user