2
0
mirror of https://github.com/dpethes/rerogue.git synced 2025-06-07 18:58:32 +02:00

update imgui bindings

This commit is contained in:
dpethes 2017-05-24 08:32:50 +02:00
parent d2876aece6
commit 14c05bec13
2 changed files with 1033 additions and 74 deletions

File diff suppressed because it is too large Load Diff

View File

@ -402,28 +402,28 @@ var
begin begin
ImGui_ImplSdlGL2_NewFrame(g_window); ImGui_ImplSdlGL2_NewFrame(g_window);
style := igGetStyle(); style := Imgui.GetStyle();
style^.WindowRounding := 0; style^.WindowRounding := 0;
igBegin('Mesh'); Imgui.Begin_('Mesh');
if not g_model_loading_failed then begin if not g_model_loading_failed then begin
Imgui.Text(g_model_name); Imgui.Text(g_model_name);
end else end else
Imgui.Text('mesh loading failed :('); Imgui.Text('mesh loading failed :(');
igEnd; Imgui.End_;
igBegin('Rendering options'); Imgui.Begin_('Rendering options');
igCheckbox('points', @view.opts.points); Imgui.Checkbox('points', @view.opts.points);
igCheckbox('wireframe', @view.opts.wireframe); Imgui.Checkbox('wireframe', @view.opts.wireframe);
igCheckbox('textures', @view.opts.textures); Imgui.Checkbox('textures', @view.opts.textures);
igCheckbox('vertex colors', @view.opts.vcolors); Imgui.Checkbox('vertex colors', @view.opts.vcolors);
if g_model <> nil then if g_model <> nil then
if igButton('Export to obj', ImVec2Init(0,0)) then if Imgui.Button('Export to obj', ImVec2Init(0,0)) then
g_model.ExportObj('rs_exported.obj'); g_model.ExportObj('rs_exported.obj');
igEnd; Imgui.End_;
selected_mesh_name := EmptyStr; selected_mesh_name := EmptyStr;
igBegin('File list'); Imgui.Begin_('File list');
//todo filter //todo filter
for file_item in g_filelist do begin for file_item in g_filelist do begin
fitem_selected := file_item.name = g_model_name; fitem_selected := file_item.name = g_model_name;
@ -432,7 +432,7 @@ begin
selected_item := file_item; selected_item := file_item;
end; end;
end; end;
igEnd; Imgui.End_;
if (selected_mesh_name <> EmptyStr) and (selected_mesh_name <> g_model_name) then begin if (selected_mesh_name <> EmptyStr) and (selected_mesh_name <> g_model_name) then begin
try try