Gamestudio Links
Zorro Links
Newest Posts
Disable MT4 during training
by Grat. 12/02/20 17:33
Oanda Stop Loss
by MatPed. 12/02/20 14:57
Newbie questions
by bot. 12/02/20 11:49
DirectX : 3d Hardware Reset Failure
by 3run. 12/01/20 18:23
CQG
by AndrewAMD. 12/01/20 15:09
Zorro on Linux
by andydoc. 12/01/20 15:06
About path_create
by 20BN. 12/01/20 08:10
Votes for future features
by Naicigam. 11/30/20 21:49
AUM Magazine
Latest Screens
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
11 registered members (Mio, Grat, Quad, AndrewAMD, HellThunder, 3run, MatPed, dBc, 20BN, jenGs), 480 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ZenMaster, paco101, fumo59, andydoc, lento
18549 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 6 1 2 3 4 5 6
Imgui Lite-c Development #478265
09/26/19 19:43
09/26/19 19:43
Joined: Feb 2013
Posts: 122
Maysville, Ga
Evo Offline OP
Member
Evo  Offline 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-integration
Txesmi's File Browser Plugin : https://github.com/txesmi/imgui-Lite-C-integration

Custom 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 v2
[Linked Image]

Original Template v1
Imgui Template v1
[Linked Image]


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: 584
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 584
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.
[Linked Image]

btw: i discovered that we can use "imgui_slider_var" for engine variables directly. e.g:

Code
imgui_slider_var("##Rotation", &mdl_example->pan, set_ent_pan_min, set_ent_pan_max);

Re: Imgui Lite-c Development [Re: Evo] #478269
09/26/19 22:09
09/26/19 22:09
Joined: Jun 2007
Posts: 1,334
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,334
Hiporope and its pain
Thank you very much to all!

Re: Imgui Lite-c Development [Re: Emre] #478270
09/26/19 22:22
09/26/19 22:22
Joined: Feb 2013
Posts: 122
Maysville, Ga
Evo Offline OP
Member
Evo  Offline OP
Member

Joined: Feb 2013
Posts: 122
Maysville, Ga
Thanks Emre. Once I know the dll has been updated with some new features, I'll update the template.

Re: Imgui Lite-c Development [Re: Evo] #478272
09/27/19 07:27
09/27/19 07:27
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Online
Member
jenGs  Online
Member
J

Joined: Jul 2010
Posts: 283
Germany
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.

Re: Imgui Lite-c Development [Re: jenGs] #478273
09/27/19 07:29
09/27/19 07:29
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Online
Member
jenGs  Online
Member
J

Joined: Jul 2010
Posts: 283
Germany
@Emre I welcome the tabs and font addition, because they are indeed still missing

Re: Imgui Lite-c Development [Re: jenGs] #478274
09/27/19 08:24
09/27/19 08:24
Joined: Jul 2007
Posts: 584
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 584
Turkey, izmir
Originally Posted by jenGs
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!

Originally Posted by jenGs
@Emre I welcome the tabs and font addition, because they are indeed still missing


Tabs are here:

SDK
Code
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

Code
var  imgui_begintabbar(char* str_id, long flags);
void imgui_endtabbar();
var imgui_begintabitem(char* label,void* state,long flags);
void imgui_endtabitem();


Example:

Code
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.

Re: Imgui Lite-c Development [Re: Evo] #478276
09/27/19 10:40
09/27/19 10:40
Joined: Feb 2003
Posts: 144
RP China
2
20BN Online
Member
20BN  Online
Member
2

Joined: Feb 2003
Posts: 144
RP China
@jenGs @Emre @EVO

THANKS ALL!

Can't support Asian languages at present, can you update dll?

Re: Imgui Lite-c Development [Re: 20BN] #478277
09/27/19 11:13
09/27/19 11:13
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Online
Member
jenGs  Online
Member
J

Joined: Jul 2010
Posts: 283
Germany
@20BN Imgui can display unicode, but the problem is Lite-C. I don't know what _chr(STRING) gives back with an unicode STRING. Can't promise anything, but I will look into it. I think I have to decode the characters, because ImGui uses normal char* not wchars to display unicode (If i am not mistaken)

Re: Imgui Lite-c Development [Re: Evo] #478281
09/27/19 14:55
09/27/19 14:55
Joined: Feb 2013
Posts: 122
Maysville, Ga
Evo Offline OP
Member
Evo  Offline OP
Member

Joined: Feb 2013
Posts: 122
Maysville, Ga
@jenGs : Thank you for taking the time to update your dll. I look forward to adding some new features and custom ideas to the imgui template.

@Emre : Thanks for helping get some of these features integrated.

* I was curious about custom window background styling. Windows are separate from lite-c layers and panels can't be layered between windows. The old lbgui had structs set up and BMAP images were used for window BG creation/styling.

Q. Is there a draw_list method for images? (imgui_drawlist_add_image(x,y,size,bmap,etc)). Drawlist commands can render into windows and that would allow me to create a custom feature for adding image backgrounds that are layered behind elements within a transparent window BG (Using the get methods to obtain window xy,size, custom bgs can be drawn for any window). This would let developers match the style of their in-game gui and to use imgui for actual in-game menus. Seamlessly integrating its visual with gui thats already been created for their projects. A drawlist method for images should be all that's needed for me to create the feature.

Page 1 of 6 1 2 3 4 5 6

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1