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()
@onEscape: Options.hide()
TabBar
TabBarRounded
id: optionsTabBar
anchors.top: parent.top
anchors.left: parent.left

View File

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

View File

@ -3,7 +3,7 @@ TabBar < UITabBar
TabBarPanel < Panel
TabBarButton < UIButton
size: 20 20
image-source: /images/tabbutton_rounded.png
image-source: /images/tabbutton_square.png
image-color: white
image-clip: 0 0 20 20
image-border: 2
@ -33,3 +33,8 @@ TabBarButton < UIButton
$on !checked:
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-auto-resize: true
ConsoleTabBar < TabBar
ConsoleTabBarPanel < TabBarPanel
ConsoleTabBar < TabBarRounded
ConsoleTabBarPanel < TabBarRoundedPanel
id: consoleTab
ScrollablePanel
@ -32,7 +32,7 @@ ConsoleTabBarPanel < TabBarPanel
step: 14
pixels-scroll: true
ConsoleTabBarButton < TabBarButton
ConsoleTabBarButton < TabBarRoundedButton
Panel
id: consolePanel

View File

@ -8,6 +8,7 @@
List:
* Add constraints for creating/buying offers:
- 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 offer management:
@ -394,7 +395,7 @@ local function updateBalance(balance)
if balance < 0 then balance = 0 end
information.balance = balance
balanceLabel:setText('Balance: '..balance..'gp')
balanceLabel:setText('Balance: '..balance..' gold')
balanceLabel:resizeToText()
end
@ -885,7 +886,7 @@ end
function Market.refreshItemsWidget(selectItem)
local selectItem = selectItem or 0
itemsPanel = marketOffersPanel:recursiveGetChildById('itemsPanel')
itemsPanel = browsePanel:recursiveGetChildById('itemsPanel')
local layout = itemsPanel:getLayout()
layout:disableUpdates()

View File

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

View File

@ -1,17 +1,7 @@
MarketComboBoxPopupMenuButton < UIButton
MarketComboBoxPopupMenuButton < ComboBoxRoundedPopupMenuButton
height: 18
font: verdana-11px-rounded
text-align: left
text-offset: 2 2
color: #aaaaaa
background-color: alpha
$hover !disabled:
color: #ffffff
background-color: #ffffff44
$disabled:
color: #555555
MarketComboBoxPopupMenuSeparator < UIWidget
image-source: /images/combobox_rounded.png
@ -20,26 +10,9 @@ MarketComboBoxPopupMenuSeparator < UIWidget
height: 1
phantom: true
MarketComboBoxPopupMenu < UIPopupMenu
image-source: /images/combobox_rounded.png
image-clip: 0 60 89 20
image-border: 1
image-border-top: 0
padding: 1
MarketComboBoxPopupMenu < ComboBoxRoundedPopupMenu
MarketComboBox < UIComboBox
MarketComboBox < ComboBoxRounded
font: verdana-11px-rounded
color: #aaaaaa
size: 86 20
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
size: 80 20
MarketTabBarPanel < Panel
MarketTabBarButton < UIButton
MarketTabBar < TabBar
MarketTabBarPanel < TabBarPanel
MarketTabBarButton < TabBarButton
size: 20 25
image-source: /images/tabbutton_square.png
font: verdana-11px-rounded
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:
image-clip: 0 20 20 20

View File

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