fix scroll, container item size, tradewindow scroll, questlog window alignment, stop attacking same creature

master
Henrique Santiago 12 years ago
parent e4cb9b27db
commit fda3ae6809

@ -28,4 +28,3 @@ hotkeys works while windows are locked, it shouldn't
skulls is rendering outside map bounds skulls is rendering outside map bounds
party options does not work when re-logging inside a party party options does not work when re-logging inside a party
sometimes we can still view hits from above/bottom floors from a fight that is not visible sometimes we can still view hits from above/bottom floors from a fight that is not visible
scroll does not follow characerlist selection when changing focus with up/down arrows

@ -128,12 +128,12 @@ end
function UIScrollBar:decrement(count) function UIScrollBar:decrement(count)
count = count or self.step count = count or self.step
self:setValue(self.value - self.step) self:setValue(self.value - count)
end end
function UIScrollBar:increment(count) function UIScrollBar:increment(count)
count = count or self.step count = count or self.step
self:setValue(self.value + self.step) self:setValue(self.value + count)
end end
function UIScrollBar:setMaximum(maximum) function UIScrollBar:setMaximum(maximum)

@ -5,11 +5,11 @@ ContainerWindow < MiniWindow
id: containerItemWidget id: containerItemWidget
virtual: true virtual: true
item-id: 3253 item-id: 3253
size: 32 32 size: 16 16
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
margin-top: -6 margin-top: 4
margin-left: -6 margin-left: 4
UIButton UIButton
id: upButton id: upButton

@ -6,49 +6,70 @@ TradeWindow < MiniWindow
id: tradeItem id: tradeItem
virtual: true virtual: true
item-id: 3253 item-id: 3253
size: 32 32 size: 16 16
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
margin-top: -6 margin-top: 4
margin-left: -6 margin-left: 4
MiniWindowContents MiniWindowContents
padding: 6 padding: 6
ScrollableFlatPanel ScrollableFlatPanel
id: ownTradeContainer id: ownTradeContainer
anchors.top: parent.top
anchors.bottom: acceptButton.top
anchors.left: parent.left anchors.left: parent.left
anchors.top: tradeScrollBar.top anchors.right: ownTradeScrollBar.left
anchors.right: tradeScrollBar.left margin-top: 14
anchors.bottom: tradeScrollBar.bottom margin-bottom: 4
padding: 2
layout: layout:
type: grid type: grid
cell-size: 36 36 cell-size: 36 36
flow: true flow: true
cell-spacing: 0 cell-spacing: 0
vertical-scrollbar: tradeScrollBar vertical-scrollbar: ownTradeScrollBar
VerticalScrollBar
id: ownTradeScrollBar
anchors.top: parent.top
anchors.bottom: acceptButton.top
anchors.right: counterTradeContainer.left
margin-top: 14
margin-bottom: 4
step: 14
pixels-scroll: true
$disabled:
width: 0
ScrollableFlatPanel ScrollableFlatPanel
id: counterTradeContainer id: counterTradeContainer
anchors.right: parent.right anchors.top: parent.top
anchors.top: tradeScrollBar.top anchors.bottom: acceptButton.top
anchors.left: tradeScrollBar.right anchors.left: parent.horizontalCenter
anchors.bottom: tradeScrollBar.bottom anchors.right: counterTradeScrollBar.left
margin-top: 14
margin-bottom: 4
padding: 2
layout: layout:
type: grid type: grid
cell-size: 36 36 cell-size: 36 36
flow: true flow: true
cell-spacing: 0 cell-spacing: 0
vertical-scrollbar: counterTradeScrollBar
VerticalScrollBar VerticalScrollBar
id: tradeScrollBar id: counterTradeScrollBar
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: acceptButton.top anchors.bottom: acceptButton.top
anchors.horizontalCenter: parent.horizontalCenter anchors.right: parent.right
margin-top: 14 margin-top: 14
margin-bottom: 4 margin-bottom: 4
step: 14 step: 14
pixels-scroll: true pixels-scroll: true
$disabled:
width: 0
Label Label
id: ownTradeLabel id: ownTradeLabel

@ -26,19 +26,21 @@ QuestLogWindow < MainWindow
TextList TextList
id: questList id: questList
anchors.fill: parent anchors.top: parent.top
width: 190 anchors.bottom: closeButton.top
anchors.left: parent.left
anchors.right: questListScrollBar.left
margin-bottom: 10
padding: 1 padding: 1
focusable: false focusable: false
margin-bottom: 30
margin-right: 20
vertical-scrollbar: questListScrollBar vertical-scrollbar: questListScrollBar
VerticalScrollBar VerticalScrollBar
id: questListScrollBar id: questListScrollBar
anchors.top: questList.top anchors.top: parent.top
anchors.bottom: questList.bottom anchors.bottom: closeButton.top
anchors.left: questList.right anchors.right: parent.right
margin-bottom: 10
step: 14 step: 14
pixels-scroll: true pixels-scroll: true

@ -691,9 +691,14 @@ void Game::refreshContainer()
void Game::attack(const CreaturePtr& creature) void Game::attack(const CreaturePtr& creature)
{ {
if(!canPerformGameAction() || creature == m_localPlayer || creature == m_attackingCreature) if(!canPerformGameAction() || creature == m_localPlayer)
return; return;
if(creature == m_attackingCreature) {
cancelAttack();
return;
}
m_localPlayer->lockWalk(); m_localPlayer->lockWalk();
if(creature && isFollowing()) if(creature && isFollowing())
@ -1106,4 +1111,4 @@ void Game::setFollowingCreature(const CreaturePtr& creature)
m_followingCreature = creature; m_followingCreature = creature;
g_lua.callGlobalField("g_game", "onFollowingCreatureChange", creature, oldCreature); g_lua.callGlobalField("g_game", "onFollowingCreatureChange", creature, oldCreature);
} }

Loading…
Cancel
Save