Merge branch 'main' into framerate-control

This commit is contained in:
MihailRis
2024-07-28 22:20:25 +03:00
31 changed files with 569 additions and 326 deletions
+2 -1
View File
@@ -13,5 +13,6 @@
"size": [1, 2, 1],
"rotation": "pane",
"model": "aabb",
"hitbox": [0.0, 0.0, 0.8, 1.0, 2.0, 0.2]
"hitbox": [0.0, 0.0, 0.8, 1.0, 2.0, 0.2],
"ambient-occlusion": false
}
+4 -3
View File
@@ -1,7 +1,8 @@
function create_setting(id, name, step, postfix, tooltip)
function create_setting(id, name, step, postfix, tooltip, changeonrelease)
local info = core.get_setting_info(id)
postfix = postfix or ""
tooltip = tooltip or ""
changeonrelease = changeonrelease or ""
document.root:add(gui.template("track_setting", {
id=id,
name=gui.str(name, "settings"),
@@ -10,13 +11,13 @@ function create_setting(id, name, step, postfix, tooltip)
max=info.max,
step=step,
postfix=postfix,
tooltip=tooltip
tooltip=tooltip,
changeonrelease=changeonrelease
}))
update_setting(core.get_setting(id), id, name, postfix)
end
function update_setting(x, id, name, postfix)
core.set_setting(id, x)
-- updating label
document[id..".L"].text = string.format(
"%s: %s%s",
+4 -3
View File
@@ -1,7 +1,8 @@
function create_setting(id, name, step, postfix, tooltip)
function create_setting(id, name, step, postfix, tooltip, changeonrelease)
local info = core.get_setting_info(id)
postfix = postfix or ""
tooltip = tooltip or ""
changeonrelease = changeonrelease or ""
document.root:add(gui.template("track_setting", {
id=id,
name=gui.str(name, "settings"),
@@ -10,13 +11,13 @@ function create_setting(id, name, step, postfix, tooltip)
max=info.max,
step=step,
postfix=postfix,
tooltip=tooltip
tooltip=tooltip,
changeonrelease=changeonrelease
}))
update_setting(core.get_setting(id), id, name, postfix)
end
function update_setting(x, id, name, postfix)
core.set_setting(id, x)
-- updating label
document[id..".L"].text = string.format(
"%s: %s%s",
+2 -1
View File
@@ -2,5 +2,6 @@
<label id='%{id}.L' margin='0,3,0,0'>%{name}: %{value}%{postfix}</label>
<trackbar
value='%{value}' min='%{min}' max='%{max}' step='%{step}' tooltip='%{tooltip}'
consumer='function(x) update_setting(x, "%{id}", "%{name}", "%{postfix}") end'/>
consumer='function(x) core.set_setting("%{id}", x) end' change-on-release='%{changeonrelease}'
sub-consumer='function(x) update_setting(x, "%{id}", "%{name}", "%{postfix}") end'/>
</panel>