change interface style, add top menu

This commit is contained in:
Eduardo Bart
2011-11-01 14:41:15 -02:00
parent 999fa731c0
commit 59017205b0
29 changed files with 197 additions and 3020 deletions

View File

@@ -0,0 +1,14 @@
TopMenu = {}
-- private variables
local topMenu
-- public functions
function TopMenu.create()
topMenu = UI.loadAndDisplay("/topmenu/topmenu.otui")
end
function TopMenu.destroy()
topMenu:destroy()
topMenu = nil
end

View File

@@ -0,0 +1,18 @@
Module
name: topmenu
description: Create the top menu
author: OTClient team
website: https://github.com/edubart/otclient
version: 0.2
autoLoad: true
dependencies:
- core
onLoad: |
require 'topmenu'
TopMenu.create()
return true
onUnload: |
TopMenu.destroy()

View File

@@ -0,0 +1,52 @@
TopPanel
id: topMenu
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
focusable: false
TopButton
anchors.top: parent.top
anchors.left: parent.left
margin.top: 3
margin.left: 6
UIWidget
size: 16 16
image: /core_ui/icons/settings.png
anchors.centerIn: parent
phantom: true
TopButton
anchors.top: prev.top
anchors.left: prev.right
margin.left: 6
UIWidget
size: 16 16
image: /core_ui/icons/login.png
anchors.centerIn: parent
phantom: true
TopButton
anchors.top: parent.top
anchors.right: parent.right
margin.top: 3
margin.right: 6
UIWidget
size: 16 16
image: /core_ui/icons/exit.png
anchors.centerIn: parent
phantom: true
TopButton
anchors.top: prev.top
anchors.right: prev.left
margin.right: 6
UIWidget
size: 16 16
image: /core_ui/icons/logout.png
anchors.centerIn: parent
phantom: true