Loading...
  OR  Zero-K Name:    Password:   

Post edit history

EZSelector (Widget)

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
5/21/2016 5:32:54 AMDErank[2up]knorke before revert after revert
5/21/2016 5:32:22 AMDErank[2up]knorke before revert after revert
Before After
1 Nice, a bit like the 'old' selection-hotkeys of engine but with visuals. 1 Nice, a bit like the 'old' selection-hotkeys of engine but with visuals.
2 Maybe have outline on the text, on [url]http://i. imgur. com/k7pk6gY. jpg[/url] it is hard to read I think. 2 Maybe have outline on the text, especially the blue text is hard to read I think.
3 \n 3 \n
4 For keycode constants you can include this file 4 For keycode constants you can include this file
5 https://github.com/spring/spring/blob/5f08624585852b8c8dfd1a16d020ae530269dc09/cont/LuaUI/Headers/keysym.h.lua 5 https://github.com/spring/spring/blob/5f08624585852b8c8dfd1a16d020ae530269dc09/cont/LuaUI/Headers/keysym.h.lua
6 via 6 via
7 include("keysym.h.lua") 7 include("keysym.h.lua")
8 and then be like 8 and then be like
9 [i]function widget:KeyPress(key) 9 [i]function widget:KeyPress(key)
10 if (key == KEYSYMS.S) then[/i] 10 if (key == KEYSYMS.S) then[/i]
11 \n 11 \n
12 For TraceScreenRay and its random numbers see 12 For TraceScreenRay and its random numbers see
13 https://springrts.com/wiki/Lua_UnsyncedRead#Screen_Trace 13 https://springrts.com/wiki/Lua_UnsyncedRead#Screen_Trace
14 This is a bit 'guessing' and can be UB: 14 This is a bit 'guessing' and can be UB:
15 [quote] 15 [quote]
16 if Spring.ValidUnitID(pos) then 16 if Spring.ValidUnitID(pos) then
17 x,_,y = Spring.GetUnitPosition(pos) 17 x,_,y = Spring.GetUnitPosition(pos)
18 elseif Spring.ValidFeatureID(pos) then 18 elseif Spring.ValidFeatureID(pos) then
19 [/quote]Say the ray hits the feature with ID=25. But elsewhere there is also a [i]unit[/i] with ID=25. 19 [/quote]Say the ray hits the feature with ID=25. But elsewhere there is also a [i]unit[/i] with ID=25.
20 Then ValidUnitID(pos) will be true but will not be what you want. 20 Then ValidUnitID(pos) will be true but will not be what you want.
21 (Super unlikely but since the returned values tell if it hit a unit/feature/ground, use that.) 21 (Super unlikely but since the returned values tell if it hit a unit/feature/ground, use that.)
22 \n 22 \n
23 Instead of GameFrame() maybe try Update() because GameFrame stops ticking during pause. 23 Instead of GameFrame() maybe try Update() because GameFrame stops ticking during pause.
24 (So the widget keeps working during pausewars like other GUI) 24 (So the widget keeps working during pausewars like other GUI)