mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
create in game interface panels and renable about and options windows
This commit is contained in:
19
modules/options/options.lua
Normal file
19
modules/options/options.lua
Normal 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
|
13
modules/options/options.otmod
Normal file
13
modules/options/options.otmod
Normal 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
|
||||
|
116
modules/options/options.otui
Normal file
116
modules/options/options.otui
Normal 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()
|
Reference in New Issue
Block a user