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

This commit is contained in:
Henrique Santiago 2012-06-03 17:05:35 -03:00
parent e4cb9b27db
commit fda3ae6809
6 changed files with 71 additions and 44 deletions

1
BUGS
View File

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

View File

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

View File

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

View File

@ -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.left: parent.left
anchors.top: tradeScrollBar.top
anchors.right: tradeScrollBar.left
anchors.bottom: tradeScrollBar.bottom
layout:
type: grid
cell-size: 36 36
flow: true
cell-spacing: 0
vertical-scrollbar: tradeScrollBar
ScrollableFlatPanel
id: counterTradeContainer
anchors.right: parent.right
anchors.top: tradeScrollBar.top
anchors.left: tradeScrollBar.right
anchors.bottom: tradeScrollBar.bottom
layout:
type: grid
cell-size: 36 36
flow: true
cell-spacing: 0
VerticalScrollBar
id: tradeScrollBar
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: acceptButton.top anchors.bottom: acceptButton.top
anchors.horizontalCenter: parent.horizontalCenter anchors.left: parent.left
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: ownTradeScrollBar
VerticalScrollBar
id: ownTradeScrollBar
anchors.top: parent.top
anchors.bottom: acceptButton.top
anchors.right: counterTradeContainer.left
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
ScrollableFlatPanel
id: counterTradeContainer
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: counterTradeScrollBar
anchors.top: parent.top
anchors.bottom: acceptButton.top
anchors.right: parent.right
margin-top: 14
margin-bottom: 4
step: 14
pixels-scroll: true
$disabled:
width: 0
Label Label
id: ownTradeLabel id: ownTradeLabel

View File

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

View File

@ -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);
} }