Some fixes with layouts, NPC trade window, and market.

This commit is contained in:
BeniS 2012-08-07 11:13:33 +12:00
parent 7b1aba1fa5
commit bd61a89675
9 changed files with 25 additions and 57 deletions

View File

@ -22,7 +22,7 @@ MainWindow
@onEnter: Options.hide() @onEnter: Options.hide()
@onEscape: Options.hide() @onEscape: Options.hide()
TabBar TabBarRounded
id: optionsTabBar id: optionsTabBar
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left

View File

@ -60,3 +60,7 @@ ButtonBox < UICheckBox
$disabled: $disabled:
color: #666666ff color: #666666ff
image-color: #ffffff88 image-color: #ffffff88
ButtonBoxRounded < ButtonBox
image-source: /images/tabbutton_rounded.png
image-border: 2

View File

@ -3,7 +3,7 @@ TabBar < UITabBar
TabBarPanel < Panel TabBarPanel < Panel
TabBarButton < UIButton TabBarButton < UIButton
size: 20 20 size: 20 20
image-source: /images/tabbutton_rounded.png image-source: /images/tabbutton_square.png
image-color: white image-color: white
image-clip: 0 0 20 20 image-clip: 0 0 20 20
image-border: 2 image-border: 2
@ -33,3 +33,8 @@ TabBarButton < UIButton
$on !checked: $on !checked:
color: #F55E5E color: #F55E5E
TabBarRounded < TabBar
TabBarRoundedPanel < TabBarPanel
TabBarRoundedButton < TabBarButton
image-source: /images/tabbutton_rounded.png

View File

@ -6,8 +6,8 @@ ConsoleLabel < UILabel
text-wrap: true text-wrap: true
text-auto-resize: true text-auto-resize: true
ConsoleTabBar < TabBar ConsoleTabBar < TabBarRounded
ConsoleTabBarPanel < TabBarPanel ConsoleTabBarPanel < TabBarRoundedPanel
id: consoleTab id: consoleTab
ScrollablePanel ScrollablePanel
@ -32,7 +32,7 @@ ConsoleTabBarPanel < TabBarPanel
step: 14 step: 14
pixels-scroll: true pixels-scroll: true
ConsoleTabBarButton < TabBarButton ConsoleTabBarButton < TabBarRoundedButton
Panel Panel
id: consolePanel id: consolePanel

View File

@ -8,6 +8,7 @@
List: List:
* Add constraints for creating/buying offers: * Add constraints for creating/buying offers:
- Add max market offers or a new method for updating depot items - Add max market offers or a new method for updating depot items
- Add timer before you can create another offer (1 minute?)
- Add a check for buying offers (if you do not have enough balance) - Add a check for buying offers (if you do not have enough balance)
* Add offer management: * Add offer management:
@ -394,7 +395,7 @@ local function updateBalance(balance)
if balance < 0 then balance = 0 end if balance < 0 then balance = 0 end
information.balance = balance information.balance = balance
balanceLabel:setText('Balance: '..balance..'gp') balanceLabel:setText('Balance: '..balance..' gold')
balanceLabel:resizeToText() balanceLabel:resizeToText()
end end
@ -885,7 +886,7 @@ end
function Market.refreshItemsWidget(selectItem) function Market.refreshItemsWidget(selectItem)
local selectItem = selectItem or 0 local selectItem = selectItem or 0
itemsPanel = marketOffersPanel:recursiveGetChildById('itemsPanel') itemsPanel = browsePanel:recursiveGetChildById('itemsPanel')
local layout = itemsPanel:getLayout() local layout = itemsPanel:getLayout()
layout:disableUpdates() layout:disableUpdates()

View File

@ -1,10 +1,9 @@
MarketButtonBox < UICheckBox MarketButtonBox < ButtonBoxRounded
font: verdana-11px-rounded font: verdana-11px-rounded
color: #f55e5ebb color: #f55e5ebb
size: 106 22 size: 106 22
text-offset: 0 2 text-offset: 0 2
text-align: center text-align: center
image-source: /images/tabbutton_rounded.png
image-clip: 0 0 20 20 image-clip: 0 0 20 20
image-border: 2 image-border: 2

View File

@ -1,17 +1,7 @@
MarketComboBoxPopupMenuButton < UIButton MarketComboBoxPopupMenuButton < ComboBoxRoundedPopupMenuButton
height: 18 height: 18
font: verdana-11px-rounded font: verdana-11px-rounded
text-align: left
text-offset: 2 2 text-offset: 2 2
color: #aaaaaa
background-color: alpha
$hover !disabled:
color: #ffffff
background-color: #ffffff44
$disabled:
color: #555555
MarketComboBoxPopupMenuSeparator < UIWidget MarketComboBoxPopupMenuSeparator < UIWidget
image-source: /images/combobox_rounded.png image-source: /images/combobox_rounded.png
@ -20,26 +10,9 @@ MarketComboBoxPopupMenuSeparator < UIWidget
height: 1 height: 1
phantom: true phantom: true
MarketComboBoxPopupMenu < UIPopupMenu MarketComboBoxPopupMenu < ComboBoxRoundedPopupMenu
image-source: /images/combobox_rounded.png
image-clip: 0 60 89 20
image-border: 1
image-border-top: 0
padding: 1
MarketComboBox < UIComboBox MarketComboBox < ComboBoxRounded
font: verdana-11px-rounded font: verdana-11px-rounded
color: #aaaaaa
size: 86 20 size: 86 20
text-offset: 3 2 text-offset: 3 2
text-align: left
image-source: /images/combobox_rounded.png
image-border: 1
image-border-right: 17
image-clip: 0 0 89 20
$hover !disabled:
image-clip: 0 20 89 20
$on:
image-clip: 0 40 89 20

View File

@ -1,23 +1,9 @@
MarketTabBar < UITabBar MarketTabBar < TabBar
size: 80 20 MarketTabBarPanel < TabBarPanel
MarketTabBarPanel < Panel MarketTabBarButton < TabBarButton
MarketTabBarButton < UIButton
size: 20 25 size: 20 25
image-source: /images/tabbutton_square.png
font: verdana-11px-rounded font: verdana-11px-rounded
text-offset: 0 2 text-offset: 0 2
image-clip: 0 0 20 20
image-border: 2
icon-color: white
color: #aaaaaa
anchors.top: parent.top
padding: 5
$first:
anchors.left: parent.left
$!first:
anchors.left: prev.right
$hover !checked: $hover !checked:
image-clip: 0 20 20 20 image-clip: 0 20 20 20

View File

@ -581,7 +581,7 @@ void ProtocolGame::parseOpenNpcTrade(const InputMessagePtr& msg)
int listCount; int listCount;
if(g_game.getClientVersion() >= 960) if(g_game.getClientVersion() >= 900)
listCount = msg->getU16(); listCount = msg->getU16();
else else
listCount = msg->getU8(); listCount = msg->getU8();