Skip to content

Commit

Permalink
Merge pull request #170 from Insality/develop
Browse files Browse the repository at this point in the history
Merge 0.8.1 to master
  • Loading branch information
Insality authored Feb 28, 2022
2 parents 10fad9c + ac72c17 commit 2a0998d
Show file tree
Hide file tree
Showing 9 changed files with 500 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Thumbs.db
.cproject
builtins
dist
deployer_version_settings.txt
.deployer_cache
6 changes: 6 additions & 0 deletions deployer_build_stats.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_count
2022-02-28T19:06:43Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,68,armv7-android,debug,true,521
2022-02-28T19:14:56Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,51,armv7-android,debug,true,521
2022-02-28T19:16:23Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521
2022-02-28T19:19:46Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521
2022-02-28T19:22:51Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521
10 changes: 5 additions & 5 deletions druid/component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ BaseComponent.ALL_INTERESTS = {

-- Mapping from on_message method to specific method name
BaseComponent.SPECIFIC_UI_MESSAGES = {
[hash(BaseComponent.ON_FOCUS_LOST)] = "on_focus_lost",
[hash(BaseComponent.ON_FOCUS_GAINED)] = "on_focus_gained",
[hash(BaseComponent.ON_LAYOUT_CHANGE)] = "on_layout_change",
[hash(BaseComponent.ON_MESSAGE_INPUT)] = "on_message_input",
[hash(BaseComponent.ON_LANGUAGE_CHANGE)] = "on_language_change",
[hash("layout_changed")] = BaseComponent.ON_LAYOUT_CHANGE, -- The message_id from Defold
[hash(BaseComponent.ON_FOCUS_LOST)] = BaseComponent.ON_FOCUS_LOST,
[hash(BaseComponent.ON_FOCUS_GAINED)] = BaseComponent.ON_FOCUS_GAINED,
[hash(BaseComponent.ON_MESSAGE_INPUT)] = BaseComponent.ON_MESSAGE_INPUT,
[hash(BaseComponent.ON_LANGUAGE_CHANGE)] = BaseComponent.ON_LANGUAGE_CHANGE,
}


Expand Down
2 changes: 1 addition & 1 deletion druid/const.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ M.ON_MESSAGE = "on_message"
M.ON_LATE_INIT = "on_late_init"
M.ON_FOCUS_LOST = "on_focus_lost"
M.ON_FOCUS_GAINED = "on_focus_gained"
M.ON_LAYOUT_CHANGE = "on_layout_changed"
M.ON_LAYOUT_CHANGE = "on_layout_change"
M.ON_MESSAGE_INPUT = "on_message_input"
M.ON_LANGUAGE_CHANGE = "on_language_change"

Expand Down
2 changes: 1 addition & 1 deletion druid/extended/slider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ end


function Slider.on_layout_change(self)
self:set(self.value, true)
self:set(self.value)
end


Expand Down
6 changes: 6 additions & 0 deletions druid/extended/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ function Timer.update(self, dt)
end
end


function Timer.on_layout_change(self)
self:set_to(self.last_value)
end


--- Set text to text field
-- @tparam Timer self
-- @tparam number set_to Value in seconds
Expand Down
14 changes: 14 additions & 0 deletions example/custom.display_profiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
profiles {
name: "Landscape"
qualifiers {
width: 900
height: 600
}
}
profiles {
name: "Portrait"
qualifiers {
width: 600
height: 900
}
}
Loading

0 comments on commit 2a0998d

Please sign in to comment.