RenderGUI error

Engy69

New member
Joined
Jul 16, 2018
Messages
2
Reaction score
0
Hello! Can anyone help me with this error? I would be grateful if someone would tell me how I could solve

C2440: '=' : cannot convert from 'ImVec2' to 'ImGuiAlign'

line 221: style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
 

user88

Well-known member
Joined
Jun 29, 2017
Messages
426
Reaction score
165
Location
LINK CLEO DICE HACK HERE!
Engy69 said:
Hello! Can anyone help me with this error? I would be grateful if someone would tell me how I could solve

C2440: '=' : cannot convert from 'ImVec2' to 'ImGuiAlign'

line 221: style.WindowTitleAlign = ImVec2(0.5f, 0.5f);

Maybe u use false func?
Self explained, u use imvex2 but it requires imguialign method (possibly)
But just c/p will not help u to understand any of that sheet
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
I haveno idea what is the expected value of "style.WindowTitleAlign" and what is the return of "ImVec2" function but you could try casting it to desired type
Code:
style.WindowTitleAlign = (ImGuiAlign)ImVec2(0.5f, 0.5f);

or try to use
Code:
style.WindowTitleAlign = ImGuiAlign_Center;
https://github.com/ocornut/imgui/issues/222#issuecomment-249415864

idk if these will work though
 

Engy69

New member
Joined
Jul 16, 2018
Messages
2
Reaction score
0
monday said:
I haveno idea what is the expected value of "style.WindowTitleAlign" and what is the return of "ImVec2" function but you could try casting it to desired type
Code:
style.WindowTitleAlign = (ImGuiAlign)ImVec2(0.5f, 0.5f);


or try to use
Code:
style.WindowTitleAlign = ImGuiAlign_Center;
https://github.com/ocornut/imgui/issues/222#issuecomment-249415864

idk if these will work though


thanks for the involvement, but unfortunately I still have not solved, I tried both codes and I get this error
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Engy69 said:
monday said:
I haveno idea what is the expected value of "style.WindowTitleAlign" and what is the return of "ImVec2" function but you could try casting it to desired type
Code:
style.WindowTitleAlign = (ImGuiAlign)ImVec2(0.5f, 0.5f);


or try to use
Code:
style.WindowTitleAlign = ImGuiAlign_Center;
https://github.com/ocornut/imgui/issues/222#issuecomment-249415864

idk if these will work though


thanks for the involvement, but unfortunately I still have not solved, I tried both codes and I get this error

I not have experience with c++ , but i have idea.:
Add symbols like " _____ " or " ----------- " and then just change that symbols to same color like dialog title background , so now this symbols invisibile, just add many to push in center :D

[shcode=cpp]
---------------------------------------- My title 
[/shcode]
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Maybe you have mismatched .h/.cpp files, according to the changelog:
[shcode=cpp]
- Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed).
[/shcode]

Maybe update to the last version?
 
Top