|
Imgui Lite-c Development
#478265
09/26/19 19:43
09/26/19 19:43
|
Joined: Feb 2013
Posts: 122 Maysville, Ga
Evo
OP
Member
|
OP
Member
Joined: Feb 2013
Posts: 122
Maysville, Ga
|
New IMGUI Template Version 2 The original imgui/lite-c contribution can be found at https://github.com/pjen/imgui-Lite-C-integrationTxesmi's File Browser Plugin : https://github.com/txesmi/imgui-Lite-C-integrationCustom v2 Template Includes : * Template source code * 4 Plug and Play Icon Kits for images and buttons. (Includes Font Awesome PNG Image Collection and 3 Magicon PNG Icon Kits) * Custom Imgui Window "Style Script" to customize and create your own theme. (style.h) * All examples are now divided within their on script file for easier management and editing. * Integrated Txesmi's File Browser Plugin. * Also now includes a few new examples for Menubars, Tabs, Histogram, imgui built-in style editor, Grid Examples, tree nodes, progress bar, and a few other new features. I hope the template can help others that may be wanting to use imgui in their projects. Template v2 : New Imgui Template v2Original Template v1 Imgui Template v1
Last edited by Evo; 04/03/20 14:52. Reason: New Version
|
|
|
Re: Imgui Lite-c Development
[Re: Evo]
#478267
09/26/19 21:44
09/26/19 21:44
|
Joined: Jul 2007
Posts: 619 Turkey, Izmir
Emre
User
|
User
Joined: Jul 2007
Posts: 619
Turkey, Izmir
|
Good work! Your style script is wonderful! i'm also add some features to dll; like fonts, tabs, digits, built in stylecolor. i'll send it to JenGs, when all functions are ready. So you guys update it from github. btw: i discovered that we can use "imgui_slider_var" for engine variables directly. e.g: imgui_slider_var("##Rotation", &mdl_example->pan, set_ent_pan_min, set_ent_pan_max);
|
|
|
Re: Imgui Lite-c Development
[Re: jenGs]
#478274
09/27/19 08:24
09/27/19 08:24
|
Joined: Jul 2007
Posts: 619 Turkey, Izmir
Emre
User
|
User
Joined: Jul 2007
Posts: 619
Turkey, Izmir
|
I went through most of the demo (official imgui demo) and converted a lot of the code to lite_c. I made a lot of improvements to my DLL (structure) and added a lot of features. If you wait until this weekend, I will update the DLL. Great news! @Emre I welcome the tabs and font addition, because they are indeed still missing Tabs are here: SDK DLLFUNC var imgui_begintabbar(char* str_id, long flags)
{
bool res = ImGui::BeginTabBar(str_id, flags);
return res ? _VAR(1) : _VAR(0);
}
DLLFUNC void imgui_endtabbar()
{
ImGui::EndTabBar();
}
DLLFUNC var imgui_begintabitem(char* label,void* state,long flags)
{
bool* dirty = (bool*)state;
bool res = ImGui::BeginTabItem(label, dirty,flags);
return res ? _VAR(1) : _VAR(0);
}
DLLFUNC void imgui_endtabitem()
{
ImGui::EndTabItem();
} Lite-c var imgui_begintabbar(char* str_id, long flags);
void imgui_endtabbar();
var imgui_begintabitem(char* label,void* state,long flags);
void imgui_endtabitem(); Example: void window_func()
{
imgui_set_next_window_pos(1, 50, ImGuiCond_Once);
imgui_set_next_window_size(400, 400, ImGuiCond_Once);
if(imgui_begin("Window1", NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove ))
{
if(imgui_begintabbar("Tabs",ImGuiTabBarFlags_None))
{
if(imgui_begintabitem("Tab 1",0,0))
{
imgui_text("Tab 1 Text");
imgui_endtabitem();
}
if(imgui_begintabitem("TAB 2",0,0))
{
imgui_text("Tab 2 Text");
imgui_endtabitem();
}
imgui_endtabbar();
}
imgui_end();
}
} There is an issue about my font method. I'm storing the imgui fonts(ImFont*) in the acknex font(FONT*). i don't know if it may be cause a problem. (Right now it works without problem.) I sent a message to Superku for help/guide. I'm waiting for response. After that, i'll sharet it too.
|
|
|
|