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

@@ -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