Some fixes for class names and queue (added base class).

This commit is contained in:
BenDol
2014-06-07 04:10:14 +12:00
parent 00253e46b3
commit c083d02bef
29 changed files with 94 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
-- @docclass
UIButton = extends(UIWidget)
UIButton = extends(UIWidget, "UIButton")
function UIButton.create()
local button = UIButton.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UICheckBox = extends(UIWidget)
UICheckBox = extends(UIWidget, "UICheckBox")
function UICheckBox.create()
local checkbox = UICheckBox.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIComboBox = extends(UIWidget)
UIComboBox = extends(UIWidget, "UIComboBox")
function UIComboBox.create()
local combobox = UIComboBox.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIImageView = extends(UIWidget)
UIImageView = extends(UIWidget, "UIImageView")
function UIImageView.create()
local imageView = UIImageView.internalCreate()

View File

@@ -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()

View File

@@ -1,5 +1,5 @@
-- @docclass
UILabel = extends(UIWidget)
UILabel = extends(UIWidget, "UILabel")
function UILabel.create()
local label = UILabel.internalCreate()

View File

@@ -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

View File

@@ -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)

View File

@@ -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?

View File

@@ -1,5 +1,5 @@
-- @docclass
UIMoveableTabBar = extends(UIWidget)
UIMoveableTabBar = extends(UIWidget, "UIMoveableTabBar")
-- private functions
local function onTabClick(tab)

View File

@@ -1,5 +1,5 @@
-- @docclass
UIPopupMenu = extends(UIWidget)
UIPopupMenu = extends(UIWidget, "UIPopupMenu")
local currentMenu

View File

@@ -1,5 +1,5 @@
-- @docclass
UIProgressBar = extends(UIWidget)
UIProgressBar = extends(UIWidget, "UIProgressBar")
function UIProgressBar.create()
local progressbar = UIProgressBar.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIRadioGroup = newclass()
UIRadioGroup = newclass("UIRadioGroup")
function UIRadioGroup.create()
local radiogroup = UIRadioGroup.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIResizeBorder = extends(UIWidget)
UIResizeBorder = extends(UIWidget, "UIResizeBorder")
function UIResizeBorder.create()
local resizeborder = UIResizeBorder.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIScrollArea = extends(UIWidget)
UIScrollArea = extends(UIWidget, "UIScrollArea")
-- public functions
function UIScrollArea.create()

View File

@@ -1,5 +1,5 @@
-- @docclass
UIScrollBar = extends(UIWidget)
UIScrollBar = extends(UIWidget, "UIScrollBar")
-- private functions
local function calcValues(self)

View File

@@ -1,5 +1,5 @@
-- @docclass
UISpinBox = extends(UITextEdit)
UISpinBox = extends(UITextEdit, "UISpinBox")
function UISpinBox.create()
local spinbox = UISpinBox.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UISplitter = extends(UIWidget)
UISplitter = extends(UIWidget, "UISplitter")
function UISplitter.create()
local splitter = UISplitter.internalCreate()

View File

@@ -1,5 +1,5 @@
-- @docclass
UITabBar = extends(UIWidget)
UITabBar = extends(UIWidget, "UITabBar")
-- private functions
local function onTabClick(tab)

View File

@@ -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'

View File

@@ -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