create in game interface panels and renable about and options windows

This commit is contained in:
Eduardo Bart
2011-11-03 07:59:11 -02:00
parent b05bb7818d
commit b345a6d783
30 changed files with 400 additions and 70 deletions

View File

@@ -0,0 +1,19 @@
Options = {}
-- private variables
local options
-- public functions
function Options.create()
options = UI.loadAndDisplay("/options/options.otui")
UI.root:lockChild(options)
end
function Options.destroy()
options:destroy()
options = nil
end
function Options.openWebpage()
displayErrorBox("Error", "Not implemented yet")
end

View File

@@ -0,0 +1,13 @@
Module
name: options
description: Create the options window
author: OTClient team
website: https://github.com/edubart/otclient
autoLoad: true
dependencies:
- core
onLoad: |
require 'options'
return true

View File

@@ -0,0 +1,116 @@
MainWindow
id: optionsWindow
title: Options
size: 286 262
// general
Button
text: General
anchors.left: parent.left
anchors.top: parent.top
margin.left: 18
margin.top: 32
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: |-
Change general
game options
anchors.left: prev.right
anchors.top: prev.top
margin.left: 10
margin.top: -2
// graphics
Button
text: Graphics
anchors.left: parent.left
anchors.top: parent.top
margin.left: 18
margin.top: 65
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: |-
Change graphics and
performance settings
anchors.left: prev.right
anchors.top: prev.top
margin.left: 10
margin.top: -2
// console
Button
text: Console
anchors.left: parent.left
anchors.top: parent.top
margin.left: 18
margin.top: 98
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: Customise the console
anchors.left: prev.right
anchors.top: prev.top
margin.left: 10
margin.top: -2
// hotkeys
Button
text: Hotkeys
anchors.left: parent.left
anchors.top: parent.top
margin.left: 18
margin.top: 131
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: Edit your hotkey texts
anchors.left: prev.right
anchors.top: prev.top
margin.left: 10
margin.top: -2
HorizontalSeparator
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
margin.bottom: 97
margin.left: 18
margin.right: 18
// motd
Button
text: Motd
anchors.left: parent.left
anchors.bottom: parent.bottom
margin.left: 18
margin.bottom: 60
onClick: displayErrorBox("Error", "Not implemented yet")
Label
text: |-
Show the most recent
Message of the Day
anchors.left: prev.right
anchors.top: prev.top
margin.left: 10
margin.top: -2
HorizontalSeparator
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
margin.bottom: 40
margin.left: 13
margin.right: 13
// ok button
Button
text: Ok
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
margin.right: 10
margin.bottom: 10
onClick: Options.destroy()