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
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
scroll does not follow characerlist selection when changing focus with up/down arrows

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

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

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

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

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

Loading…
Cancel
Save