mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Remove debug log messages, update docs
This commit is contained in:
@@ -5,6 +5,24 @@
|
||||
-- # Component List #
|
||||
--
|
||||
-- See all component list in "See Also" section.
|
||||
--
|
||||
-- # Notes #
|
||||
--
|
||||
-- Take a look on the next API pages:
|
||||
--
|
||||
-- - @{Helper} - Useful pack of functions to work with GUI nodes like centrate nodes
|
||||
--
|
||||
-- - @{DruidEvent} - The core event system in Druid. See how to subscribe on any event
|
||||
--
|
||||
-- - @{BaseComponent} - the parent of all Druid components, you can see all default component methods there
|
||||
--
|
||||
-- Other things:
|
||||
--
|
||||
-- - To use Druid, first you should create a Druid instance to spawn components and add Druids main engine functions: update, final, on_message and on_input.
|
||||
--
|
||||
-- - All Druid components take node name string as arguments, don't do gui.get_node() before.
|
||||
--
|
||||
-- - All Druid and component methods are called with : like self.druid:new_button().
|
||||
-- @usage
|
||||
-- local druid = require("druid.druid")
|
||||
--
|
||||
@@ -75,32 +93,27 @@ local text = require("druid.base.text")
|
||||
-- local data_list = require("druid.extended.data_list")
|
||||
-- local swipe = require("druid.extended.swipe")
|
||||
|
||||
|
||||
local DruidInstance = class("druid.druid_instance")
|
||||
|
||||
local IS_NO_AUTO_INPUT = sys.get_config("druid.no_auto_input") == "1"
|
||||
local IS_NO_AUTO_INPUT = sys.get_config_int("druid.no_auto_input", 0) == 1
|
||||
|
||||
local function input_init(self)
|
||||
if IS_NO_AUTO_INPUT then
|
||||
if IS_NO_AUTO_INPUT or self.input_inited then
|
||||
return
|
||||
end
|
||||
|
||||
if not self.input_inited then
|
||||
self.input_inited = true
|
||||
druid_input.focus()
|
||||
end
|
||||
self.input_inited = true
|
||||
druid_input.focus()
|
||||
end
|
||||
|
||||
|
||||
local function input_release(self)
|
||||
if IS_NO_AUTO_INPUT then
|
||||
if IS_NO_AUTO_INPUT or not self.input_inited then
|
||||
return
|
||||
end
|
||||
|
||||
if self.input_inited then
|
||||
self.input_inited = false
|
||||
druid_input.remove()
|
||||
end
|
||||
self.input_inited = false
|
||||
druid_input.remove()
|
||||
end
|
||||
|
||||
|
||||
@@ -290,8 +303,6 @@ function DruidInstance.final(self)
|
||||
self._deleted = true
|
||||
|
||||
input_release(self)
|
||||
|
||||
self:log_message("Druid final")
|
||||
end
|
||||
|
||||
|
||||
@@ -336,8 +347,6 @@ function DruidInstance.remove(self, component)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
self:log_message("Remove", { name = component:get_name(), parent = component:get_parent_name() })
|
||||
end
|
||||
|
||||
|
||||
@@ -437,8 +446,6 @@ function DruidInstance.on_focus_lost(self)
|
||||
for i = 1, #components do
|
||||
components[i]:on_focus_lost()
|
||||
end
|
||||
|
||||
self:log_message("On focus lost")
|
||||
end
|
||||
|
||||
|
||||
@@ -451,8 +458,6 @@ function DruidInstance.on_focus_gained(self)
|
||||
for i = 1, #components do
|
||||
components[i]:on_focus_gained()
|
||||
end
|
||||
|
||||
self:log_message("On focus gained")
|
||||
end
|
||||
|
||||
|
||||
@@ -466,8 +471,6 @@ function DruidInstance.on_language_change(self)
|
||||
for i = 1, #components do
|
||||
components[i]:on_language_change()
|
||||
end
|
||||
|
||||
self:log_message("On language change")
|
||||
end
|
||||
|
||||
|
||||
@@ -671,7 +674,7 @@ end
|
||||
-- @tparam bool no_adjust If true, will not correct text size
|
||||
-- @treturn LangText lang_text component
|
||||
function DruidInstance.new_lang_text(self, node, locale_id, no_adjust)
|
||||
return helper.extended_component("lang_text")
|
||||
return helper.extended_component("lang_text")
|
||||
end
|
||||
|
||||
|
||||
|
@@ -1,32 +1,5 @@
|
||||
local middleclass = {
|
||||
_VERSION = 'middleclass v4.1.1',
|
||||
_DESCRIPTION = 'Object Orientation for Lua',
|
||||
_URL = 'https://github.com/kikito/middleclass',
|
||||
_LICENSE = [[
|
||||
MIT LICENSE
|
||||
|
||||
Copyright (c) 2011 Enrique García Cota
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
]]
|
||||
}
|
||||
-- Source: https://github.com/kikito/middleclass
|
||||
local middleclass = {}
|
||||
|
||||
local function _createIndexWrapper(aClass, f)
|
||||
if f == nil then
|
||||
|
Reference in New Issue
Block a user