Fix action wheel and implement page scrolling

This commit is contained in:
NullBite 2022-09-26 23:06:35 -04:00
parent 8f2b292689
commit b01c184314
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 31 additions and 15 deletions

View File

@ -2,17 +2,18 @@
## General ## General
- [ ] use matrix thing for UVManager (linear algebra is hard) - [ ] use matrix thing for UVManager (linear algebra is hard)
- [ ] Add action wheel icons
## Rewrite ## Rewrite
- [ ] fix pings - [ ] fix pings
- [ ] reimplement avatar settings - [ ] reimplement avatar settings
- [ ] fix action wheel
- [ ] fix sound - [ ] fix sound
- [ ] fix Blockbench animations - [ ] fix Blockbench animations
- [ ] fix or disable custom commands (can probably use `/figura run`) - [ ] fix or disable custom commands (can probably use `/figura run`)
- [ ] fix armor, can't re-enable until cleanup - [ ] fix armor, won't re-enable until cleanup
## Cleanup ## Cleanup
- [ ] rework appropriate action wheel items as ToggleAction instead of ClickAction
- [ ] remove partial vanilla support, completely broken with inability to manipulate vanilla parts - [ ] remove partial vanilla support, completely broken with inability to manipulate vanilla parts
- [ ] remove partial_vanilla stuff from PartsManager - [ ] remove partial_vanilla stuff from PartsManager
- [ ] split off large snippets of code into separate files - [ ] split off large snippets of code into separate files
@ -21,3 +22,6 @@
- [ ] utility functions - [ ] utility functions
- [ ] cleanup tick functions, timers - [ ] cleanup tick functions, timers
- [ ] cleanup armor code to make less redundant - [ ] cleanup armor code to make less redundant
# Done
- [x] fix action wheel

View File

@ -835,19 +835,31 @@ end
-- Action Wheel & Pings -- {{{ -- Action Wheel & Pings -- {{{
-- TODO -- TODO
-- action_wheel.SLOT_1.setTitle('test expression') do
-- action_wheel.SLOT_1.setFunction(function() ping.expressionTest() end) wheel={}
-- function ping.expressionTest() local wheel_index=1
-- changeExpression("hurt", 10) function wheelScroll(change)
-- end wheel_index=((wheel_index-1)+change)%#wheel+1
-- action_wheel.SLOT_2.setTitle('log health') action_wheel:setPage(wheel[wheel_index])
-- action_wheel.SLOT_2.setFunction(function() print(player.getHealth()) end) print("page: " .. wheel_index)
-- action_wheel.SLOT_3.setTitle('Toggle Armor') end
-- action_wheel.SLOT_3.setFunction(function() setArmor() end)
-- action_wheel.SLOT_4.setTitle('T-Pose') wheel[1]=action_wheel:createPage()
-- action_wheel.SLOT_4.setFunction(function() ping.tPose() end)
-- action_wheel.SLOT_5.setTitle('UwU') action_wheel:setPage(wheel[1])
-- action_wheel.SLOT_5.setFunction(function() ping.expr("owo") end) action_wheel.scroll=wheelScroll
end
wheel[1]:newAction():title('test expression'):onLeftClick(function() ping.expressionTest() end)
function ping.expressionTest()
changeExpression("hurt", 10)
end
wheel[1]:newAction():title('log health'):onLeftClick(function() print(player:getHealth()) end)
wheel[1]:newAction():title('Toggle Armor'):onLeftClick(function() setArmor() end)
wheel[1]:newAction():title('T-Pose'):onLeftClick(function() ping.tPose() end)
wheel[1]:newAction():title('UwU'):onLeftClick(function() ping.expr("owo") end)
-- action_wheel.SLOT_8.setTitle('sssss...') -- action_wheel.SLOT_8.setTitle('sssss...')
-- action_wheel.SLOT_8.setItem("minecraft:creeper_head") -- action_wheel.SLOT_8.setItem("minecraft:creeper_head")
-- action_wheel.SLOT_8.setFunction(function() switch_model('misc/Creeper') end) -- action_wheel.SLOT_8.setFunction(function() switch_model('misc/Creeper') end)