diff --git a/modules/client_skins/skins/default/images/button.png b/modules/client_skins/skins/default/images/button_rounded.png similarity index 100% rename from modules/client_skins/skins/default/images/button.png rename to modules/client_skins/skins/default/images/button_rounded.png diff --git a/modules/client_skins/skins/default/images/button_square.png b/modules/client_skins/skins/default/images/button_square.png new file mode 100644 index 00000000..75b2c6cc Binary files /dev/null and b/modules/client_skins/skins/default/images/button_square.png differ diff --git a/modules/client_skins/skins/default/styles/buttons.otui b/modules/client_skins/skins/default/styles/buttons.otui index 5f12e009..9ca8427e 100644 --- a/modules/client_skins/skins/default/styles/buttons.otui +++ b/modules/client_skins/skins/default/styles/buttons.otui @@ -3,7 +3,7 @@ Button < UIButton color: #f0ad4dff size: 106 22 text-offset: 0 0 - image-source: /images/button.png + image-source: /images/button_rounded.png image-color: white image-clip: 0 0 20 20 image-border: 2 @@ -58,4 +58,4 @@ NextButton < BrowseButton icon-source: /images/arrow_right.png PreviousButton < BrowseButton - icon-source: /images/arrow_left.png \ No newline at end of file + icon-source: /images/arrow_left.png diff --git a/modules/client_skins/skins/default/styles/popupmenus.otui b/modules/client_skins/skins/default/styles/popupmenus.otui index 5272f2d9..b761b243 100644 --- a/modules/client_skins/skins/default/styles/popupmenus.otui +++ b/modules/client_skins/skins/default/styles/popupmenus.otui @@ -1,8 +1,17 @@ PopupMenuButton < UIButton height: 18 - margin-left: 3 - margin-right: 3 + margin-left: 5 + margin-right: 5 + margin-top: 1 + margin-bottom: 1 + size: 0 21 + text-offset: 0 0 font: verdana-11px-antialised + + image-source: /images/button_square.png + image-color: white + image-clip: 0 0 20 20 + image-border: 2 color: #aaaaaa background-color: alpha @@ -10,6 +19,7 @@ PopupMenuButton < UIButton $hover !disabled: color: #ffffff background-color: #ffffff44 + image-clip: 0 40 20 20 $disabled: color: #555555 @@ -17,6 +27,7 @@ PopupMenuButton < UIButton PopupMenuSeparator < UIWidget margin-left: 2 margin-right: 2 + margin-bottom: 1 image-source: /images/menubox.png image-border-left: 1 image-border-right: 1 diff --git a/modules/client_terminal/commands.lua b/modules/client_terminal/commands.lua index bd3238fb..77815955 100644 --- a/modules/client_terminal/commands.lua +++ b/modules/client_terminal/commands.lua @@ -35,13 +35,11 @@ function debugContainersItems() if hovered then local item = self:getItem() if item then - local text = [[ - id:]] ..item:getId() .. [[, - stackable:]] ..tostring(item:isStackable()) .. [[, - marketable:]] ..tostring(item:isMarketable()) .. [[, - vocation:]]..(item:getMarketData() and item:getMarketData().restrictVocation or 'none') ..[[, - cloth slot:]] ..item:getClothSlot() .. [[ - ]] + local text = "id: " ..item:getId() .. + "\n stackable: " ..tostring(item:isStackable()) .. + "\n marketable: " ..tostring(item:isMarketable()) .. + "\n vocation: "..(item:getMarketData() and item:getMarketData().restrictVocation or 'none') .. + "\n cloth slot: " ..item:getClothSlot() g_tooltip.display(text) end else diff --git a/modules/corelib/ui/uipopupmenu.lua b/modules/corelib/ui/uipopupmenu.lua index 889a0245..55b98bd4 100644 --- a/modules/corelib/ui/uipopupmenu.lua +++ b/modules/corelib/ui/uipopupmenu.lua @@ -41,7 +41,7 @@ function UIPopupMenu:addOption(optionName, optionCallback) self:getParent():destroy() end optionWidget:setText(optionName) - local width = optionWidget:getTextSize().width + optionWidget:getMarginLeft() + optionWidget:getMarginRight() + 6 + local width = optionWidget:getTextSize().width + optionWidget:getMarginLeft() + optionWidget:getMarginRight() + 15 self:setWidth(math.max(self:getWidth(), width)) end diff --git a/modules/game_cooldown/cooldown.lua b/modules/game_cooldown/cooldown.lua index 01fc0375..51269a58 100644 --- a/modules/game_cooldown/cooldown.lua +++ b/modules/game_cooldown/cooldown.lua @@ -91,9 +91,9 @@ function onSpellCooldown(iconId, duration) icon:setId(spellName) icon:setImageSource('/game_cooldown/icons/' .. SpelllistSettings[modules.game_spelllist.getSpelllistProfile()].iconFile) icon:setImageClip(modules.game_spelllist.getIconImageClip(otcIconId)) - icon.event = scheduleEvent(function() icon:destroy() end, duration) + icon.event = scheduleEvent(function() icon:destroy() icon = nil end, duration) - local progressRect = g_ui.createWidget('SpellProgressRect', icon) + local progressRect = g_ui.createWidget('SpellProgressRect') updateProgressRect(progressRect, duration/25, true) progressRect:setTooltip(spellName) end diff --git a/modules/game_interface/gameinterface.lua b/modules/game_interface/gameinterface.lua index c3d80e35..79145bbf 100644 --- a/modules/game_interface/gameinterface.lua +++ b/modules/game_interface/gameinterface.lua @@ -93,7 +93,7 @@ function show() gameRootPanel:show() gameRootPanel:focus() gameMapPanel:followCreature(g_game.getLocalPlayer()) - updateStretchShrink() + updateStretchShrink() end function hide() @@ -558,4 +558,4 @@ function onLeftPanelVisibilityChange(leftPanel, visible) children[i]:setParent(gameRightPanel) end end -end \ No newline at end of file +end diff --git a/modules/game_minimap/minimap.lua b/modules/game_minimap/minimap.lua index 2314c89f..a87f6f93 100644 --- a/modules/game_minimap/minimap.lua +++ b/modules/game_minimap/minimap.lua @@ -130,7 +130,7 @@ function showFlagDialog(position) flagRadioGroup:selectWidget(flagCheckbox[1]) - cancelButton.onClick = function() + cancelButton.onClick = function() flagRadioGroup:destroy() destroyFlagWindow() end diff --git a/modules/game_modaldialog/modaldialog.otui b/modules/game_modaldialog/modaldialog.otui index 9090f8e9..375e717e 100644 --- a/modules/game_modaldialog/modaldialog.otui +++ b/modules/game_modaldialog/modaldialog.otui @@ -1,5 +1,3 @@ -TextScrollbar < VerticalScrollBar - ChoiceListLabel < Label font: verdana-11px-monochrome background-color: alpha @@ -58,4 +56,4 @@ ModalDialog < MainWindow anchors.bottom: choiceList.bottom anchors.right: choiceList.right step: 14 - pixels-scroll: true \ No newline at end of file + pixels-scroll: true diff --git a/modules/game_viplist/viplist.lua b/modules/game_viplist/viplist.lua index 3ca86ee5..911180f6 100644 --- a/modules/game_viplist/viplist.lua +++ b/modules/game_viplist/viplist.lua @@ -71,7 +71,7 @@ function addVip() destroyAddWindow() end -function onAddVip(id, name, online) +function onAddVip(id, name, state) local vipList = vipWindow:getChildById('contentsPanel') local label = g_ui.createWidget('VipListLabel') @@ -79,13 +79,15 @@ function onAddVip(id, name, online) label:setId('vip' .. id) label:setText(name) - if online then + if state == VipState.Online then label:setColor('#00ff00') + elseif state == VipState.Pending then + label:setColor('#ffca38') else label:setColor('#ff0000') end - label.vipOnline = online + label.vipState = state label:setPhantom(false) connect(label, { onDoubleClick = function () g_game.openPrivateChannel(label:getText()) return true end } ) @@ -95,12 +97,13 @@ function onAddVip(id, name, online) for i=1,childrenCount do local child = vipList:getChildByIndex(i) - if online and not child.vipOnline then + if state == VipState.Online and not child.vipState == VipState.Online then vipList:insertChild(i, label) return end - if (not online and not child.vipOnline) or (online and child.vipOnline) then + if (not state == VipState.Online and not child.vipState == VipState.Online) + or (state == VipState.Online and child.vipState == VipState.Online) then local childText = child:getText():lower() local length = math.min(childText:len(), nameLower:len()) @@ -118,13 +121,13 @@ function onAddVip(id, name, online) vipList:insertChild(childrenCount+1, label) end -function onVipStateChange(id, online) +function onVipStateChange(id, state) local vipList = vipWindow:getChildById('contentsPanel') local label = vipList:getChildById('vip' .. id) local text = label:getText() label:destroy() - onAddVip(id, text, online) + onAddVip(id, text, state) end function onVipListMousePress(widget, mousePos, mouseButton) diff --git a/modules/gamelib/const.lua b/modules/gamelib/const.lua index df22c81f..8c742f1b 100644 --- a/modules/gamelib/const.lua +++ b/modules/gamelib/const.lua @@ -160,18 +160,24 @@ OsTypes = { } PathFindResults = { - Ok = 0, - Position = 1, - Impossipble = 2, - TooFar = 3, - NoWay = 4 + Ok = 0, + Position = 1, + Impossipble = 2, + TooFar = 3, + NoWay = 4 } PathFindFlags = { - AllowNullTiles = 1, - AllowCreatures = 2, - AllowNonPathable = 4, - AllowNonWalkable = 8 + AllowNullTiles = 1, + AllowCreatures = 2, + AllowNonPathable = 4, + AllowNonWalkable = 8 +} + +VipState = { + Offline = 0, + Online = 1, + Pending = 2 } -- @}