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

View File

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

View File

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

View File

@ -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.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.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-bottom: 4
step: 14
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
id: ownTradeLabel

View File

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

View File

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