How to create a RadioButton in mimgui?

plalkeo

Известный
708
280
1721499557259.png

Lua:
-- outside mimgui
local radioBool = imgui.new.bool()
local radioInt = imgui.new.int()

-- in mimgui
if imgui.RadioButtonBool('RadioButton',radioBool[0]) then
    radioBool[0] = not radioBool[0]
end
for i = 0, 3 do
    if imgui.RadioButtonIntPtr(tostring(i),radioInt,i) then
        radioInt[0] = i
    end
end
 
  • Нравится
Реакции: MLycoris и minxty

minxty

Известный
1,189
1,058
read this guide and dont create dozens of threads like this, theres everything you need
 
  • Нравится
Реакции: MLycoris и plalkeo

Runbu73

Участник
Автор темы
123
5
not works


[ML] (error) B.lua: ...a Do Dmarola\GTAAAAAAAAAAAA\moonloader\SCARLLET V2 B.lua:1998: bad argument #2 to 'RadioButtonBool' (cannot convert 'bool [1]' to 'bool')
stack traceback:
[C]: in function 'RadioButtonBool'
...a Do Dmarola\GTAAAAAAAAAAAA\moonloader\SCARLLET V2 B.lua:1998: in function '_draw'
...Do Dmarola\GTAAAAAAAAAAAA\moonloader\lib\mimgui\init.lua:107: in function <...Do Dmarola\GTAAAAAAAAAAAA\moonloader\lib\mimgui\init.lua:91>
[ML] (error) B.lua: Script died due to an error. (1AD1821C)
1721499737939.png