mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 20:43:26 +02:00
Some fixes for class names and queue (added base class).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIButton = extends(UIWidget)
|
||||
UIButton = extends(UIWidget, "UIButton")
|
||||
|
||||
function UIButton.create()
|
||||
local button = UIButton.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UICheckBox = extends(UIWidget)
|
||||
UICheckBox = extends(UIWidget, "UICheckBox")
|
||||
|
||||
function UICheckBox.create()
|
||||
local checkbox = UICheckBox.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIComboBox = extends(UIWidget)
|
||||
UIComboBox = extends(UIWidget, "UIComboBox")
|
||||
|
||||
function UIComboBox.create()
|
||||
local combobox = UIComboBox.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIImageView = extends(UIWidget)
|
||||
UIImageView = extends(UIWidget, "UIImageView")
|
||||
|
||||
function UIImageView.create()
|
||||
local imageView = UIImageView.internalCreate()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
if not UIWindow then dofile 'uiwindow' end
|
||||
|
||||
-- @docclass
|
||||
UIInputBox = extends(UIWindow)
|
||||
UIInputBox = extends(UIWindow, "UIInputBox")
|
||||
|
||||
function UIInputBox.create(title, okCallback, cancelCallback)
|
||||
local inputBox = UIInputBox.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UILabel = extends(UIWidget)
|
||||
UILabel = extends(UIWidget, "UILabel")
|
||||
|
||||
function UILabel.create()
|
||||
local label = UILabel.internalCreate()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
if not UIWindow then dofile 'uiwindow' end
|
||||
|
||||
-- @docclass
|
||||
UIMessageBox = extends(UIWindow)
|
||||
UIMessageBox = extends(UIWindow, "UIMessageBox")
|
||||
|
||||
-- messagebox cannot be created from otui files
|
||||
UIMessageBox.create = nil
|
||||
|
@@ -1,15 +1,11 @@
|
||||
-- @docclass
|
||||
UIMiniWindow = extends(UIWindow)
|
||||
UIMiniWindow = extends(UIWindow, "UIMiniWindow")
|
||||
|
||||
function UIMiniWindow.create()
|
||||
local miniwindow = UIMiniWindow.internalCreate()
|
||||
return miniwindow
|
||||
end
|
||||
|
||||
function UIMiniWindow:getClassName()
|
||||
return 'UIMiniWindow'
|
||||
end
|
||||
|
||||
function UIMiniWindow:open(dontSave)
|
||||
self:setVisible(true)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIMiniWindowContainer = extends(UIWidget)
|
||||
UIMiniWindowContainer = extends(UIWidget, "UIMiniWindowContainer")
|
||||
|
||||
function UIMiniWindowContainer.create()
|
||||
local container = UIMiniWindowContainer.internalCreate()
|
||||
@@ -9,10 +9,6 @@ function UIMiniWindowContainer.create()
|
||||
return container
|
||||
end
|
||||
|
||||
function UIMiniWindowContainer:getClassName()
|
||||
return 'UIMiniWindowContainer'
|
||||
end
|
||||
|
||||
-- TODO: connect to window onResize event
|
||||
-- TODO: try to resize another widget?
|
||||
-- TODO: try to find another panel?
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIMoveableTabBar = extends(UIWidget)
|
||||
UIMoveableTabBar = extends(UIWidget, "UIMoveableTabBar")
|
||||
|
||||
-- private functions
|
||||
local function onTabClick(tab)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIPopupMenu = extends(UIWidget)
|
||||
UIPopupMenu = extends(UIWidget, "UIPopupMenu")
|
||||
|
||||
local currentMenu
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIProgressBar = extends(UIWidget)
|
||||
UIProgressBar = extends(UIWidget, "UIProgressBar")
|
||||
|
||||
function UIProgressBar.create()
|
||||
local progressbar = UIProgressBar.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIRadioGroup = newclass()
|
||||
UIRadioGroup = newclass("UIRadioGroup")
|
||||
|
||||
function UIRadioGroup.create()
|
||||
local radiogroup = UIRadioGroup.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIResizeBorder = extends(UIWidget)
|
||||
UIResizeBorder = extends(UIWidget, "UIResizeBorder")
|
||||
|
||||
function UIResizeBorder.create()
|
||||
local resizeborder = UIResizeBorder.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIScrollArea = extends(UIWidget)
|
||||
UIScrollArea = extends(UIWidget, "UIScrollArea")
|
||||
|
||||
-- public functions
|
||||
function UIScrollArea.create()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIScrollBar = extends(UIWidget)
|
||||
UIScrollBar = extends(UIWidget, "UIScrollBar")
|
||||
|
||||
-- private functions
|
||||
local function calcValues(self)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UISpinBox = extends(UITextEdit)
|
||||
UISpinBox = extends(UITextEdit, "UISpinBox")
|
||||
|
||||
function UISpinBox.create()
|
||||
local spinbox = UISpinBox.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UISplitter = extends(UIWidget)
|
||||
UISplitter = extends(UIWidget, "UISplitter")
|
||||
|
||||
function UISplitter.create()
|
||||
local splitter = UISplitter.internalCreate()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UITabBar = extends(UIWidget)
|
||||
UITabBar = extends(UIWidget, "UITabBar")
|
||||
|
||||
-- private functions
|
||||
local function onTabClick(tab)
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Get dynamic row heights working with text wrapping.
|
||||
* Every second row different background color applied.
|
||||
]]
|
||||
UITable = extends(UIWidget)
|
||||
UITable = extends(UIWidget, "UITable")
|
||||
|
||||
local HEADER_ID = 'row0'
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
-- @docclass
|
||||
UIWindow = extends(UIWidget)
|
||||
UIWindow = extends(UIWidget, "UIWindow")
|
||||
|
||||
function UIWindow.create()
|
||||
local window = UIWindow.internalCreate()
|
||||
@@ -9,10 +9,6 @@ function UIWindow.create()
|
||||
return window
|
||||
end
|
||||
|
||||
function UIWindow:getClassName()
|
||||
return 'UIWindow'
|
||||
end
|
||||
|
||||
function UIWindow:onKeyDown(keyCode, keyboardModifiers)
|
||||
if keyboardModifiers == KeyboardNoModifier then
|
||||
if keyCode == KeyEnter then
|
||||
|
Reference in New Issue
Block a user