Skip to content

Commit

Permalink
fix: disable store gifting
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanhoare authored Oct 13, 2024
1 parent d34e3de commit 7d27e06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
14 changes: 7 additions & 7 deletions modules/game_store/store.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function onGameStoreMsg(data)
if close then
hideHistory()
gameStoreWindow:getChildById("purchaseButton"):disable()
gameStoreWindow:getChildById("giftButton"):disable()
-- gameStoreWindow:getChildById("giftButton"):disable()
gameStoreWindow:getChildById("offers"):focusChild(nil)
hide()
end
Expand Down Expand Up @@ -264,7 +264,7 @@ function changeCategory(widget, newCategory)
if category then
updateTopPanel(category)
gameStoreWindow:getChildById("purchaseButton"):disable()
gameStoreWindow:getChildById("giftButton"):disable()
-- gameStoreWindow:getChildById("giftButton"):disable()
gameStoreWindow:getChildById("search"):setText("")
end
end
Expand All @@ -281,7 +281,7 @@ function offerFocus(widget, offerWidget)
price = tonumber(price)
}
gameStoreWindow:getChildById("purchaseButton"):enable()
gameStoreWindow:getChildById("giftButton"):enable()
-- gameStoreWindow:getChildById("giftButton"):enable()
end
end

Expand All @@ -298,7 +298,7 @@ function purchaseDouble(offerWidget)
clientId = tonumber(offerWidget:getId())
}
gameStoreWindow:getChildById("purchaseButton"):enable()
gameStoreWindow:getChildById("giftButton"):enable()
-- gameStoreWindow:getChildById("giftButton"):enable()
purchase()
end
end
Expand All @@ -316,7 +316,7 @@ end
function showHistory()
gameStoreWindow:getChildById("historyButton"):hide()
gameStoreWindow:getChildById("purchaseButton"):hide()
gameStoreWindow:getChildById("giftButton"):hide()
-- gameStoreWindow:getChildById("giftButton"):hide()
gameStoreWindow:getChildById("offers"):hide()
gameStoreWindow:getChildById("offersScrollBar"):hide()
gameStoreWindow:getChildById("topPanel"):hide()
Expand All @@ -330,14 +330,14 @@ function showHistory()
gameStoreWindow:getChildById("backButton"):show()

gameStoreWindow:getChildById("purchaseButton"):disable()
gameStoreWindow:getChildById("giftButton"):disable()
-- gameStoreWindow:getChildById("giftButton"):disable()
gameStoreWindow:getChildById("offers"):focusChild(nil)
end

function hideHistory()
gameStoreWindow:getChildById("historyButton"):show()
gameStoreWindow:getChildById("purchaseButton"):show()
gameStoreWindow:getChildById("giftButton"):show()
-- gameStoreWindow:getChildById("giftButton"):show()
gameStoreWindow:getChildById("offers"):show()
gameStoreWindow:getChildById("offersScrollBar"):show()
gameStoreWindow:getChildById("topPanel"):show()
Expand Down
17 changes: 10 additions & 7 deletions modules/game_store/store.otui
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CategoryIconCreature < UICreature
anchors.fill: parent

MiniPanel < Panel
text-offset: 0 2
text-offset: 0 4
text-align: top
image-source: /images/ui/miniwindow
image-border: 4
Expand Down Expand Up @@ -74,15 +74,15 @@ OfferWidget < MiniPanel
image-source: /images/ui/item
image-border: 2
&baseText: '%s points'
color: #28db00
color: #ffffff
text-align: center
margin-left: 0
margin-right: 2

OfferIconItem < UIItem
id: offerIcon
size: 34 34
padding: 1
padding: 0
anchors.centerIn: parent
virtual: true
phantom: true
Expand All @@ -94,7 +94,7 @@ OfferIconCreature < UICreature
phantom: true

HistoryLabel < Label
height: 18
height: 25
focusable: true
background: alpha

Expand All @@ -121,16 +121,18 @@ MainWindow
anchors.top: parent.top
&baseText: 'Balance: %s'
text-auto-resize: true
font: terminus-14px-bold
font: verdana-11px-rounded
color: #8FBC8F
margin-top: 5
anchors.horizontalCenter: parent.horizontalCenter

Button
id: buyPoints
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
!text: 'Get Points'
color: #28db00
color: #ffffff
@onClick: modules.game_store.buyPoints()

TextList
Expand Down Expand Up @@ -167,6 +169,7 @@ MainWindow
anchors.top: parent.top
anchors.left: prev.right
anchors.right: parent.right
margin-top: 9
margin-left: 5
height: 18
!text: 'Potions'
Expand Down

0 comments on commit 7d27e06

Please sign in to comment.