Closed brunph closed 5 years ago
Hey @brunph thanks for reporting that issue. Are checkboxes the only controls that don't work properly?
Hey @brunph thanks for reporting that issue. Are checkboxes the only controls that don't work properly?
Wow the fast response! well checkboxes and buttons. My buttons seems to not accept the label argument? Somehow the button doesn't have a title even tho the title is 100% correct.zgui::button("button#button_1", { 120, 30 });
this is the one i'm using as an example, which provides an empty title. And from your documentation the values before the "#" should be displayed.
That's strange... Could you provide me video/gif of this occurence?
video of this in action, i agree this is really weird. Could it be the input loop being placed in the wrong part? but all the other controls are working tho. Maybe the boolean values.
Are your boolean variables static?
Can you show us your full code of hook and menu implementation? I don't have any problems with zgui in my code, I'm using also Paint Traverse. https://i.imgur.com/DnU9J6T.png
Paint traverse
else if (_panel == panel) {
zgui::poll_input("main");
if (zgui::begin_window("main", { 500, 350 }, render::get( ).watermark_font, zgui::zgui_window_flags_no_ontoggle_animation))
{
zgui::checkbox("sample checkbox #example", example);
zgui::checkbox("sample checkbox #test", test);
zgui::button("button#button_1", { 120, 30 });
// value before hash is visible ^
zgui::slider_int("#sample_slider", 0, 40, example_int);
// ^ value after hash is hidden"
//
// Hashing is demystified in zgui.hh
// Search for [hashing controls names] to get more details.
zgui::end_window();
}
}
Boolean declaration
static bool example = false; bool test = false; static int example_int = 10;
most of this code is for testing so don't mind the bad formatting and bad code etc.
Change
zgui::poll_input("main");
To
zgui::poll_input("Counter-Strike: Global Offensive");
@brunph something is wrong with your input/hooking or draw manager. Check if these things are coded/done properly. I pasted your menu code into my base and everything was working fine. I've just changed thing mentioned in @patrykkolodziej comment.
Isn't zgui handling the input? how could the input manager be wrong then. Sorry if i'm really stupid, just a new framework to work with.
Did you set input to csgo as I write earlier?
Isn't zgui handling the input? how could the input manager be wrong then. Sorry if i'm really stupid, just a new framework to work with.
It is, but you have not done it properly.
Your code:
zgui::poll_input("main");
<-- Here should be name of process window, not name of zgui window.
Proper code:
zgui::poll_input("Counter-Strike: Global Offensive");
<-- Proper way of reading input from window with name "Counter-Strike: Global Offensive".
Got it, where would be the recommended place to put this?
Describe the bug Checkboxes are not working for me.
To Reproduce Steps to reproduce the behavior:
Expected behavior I would think the checkbox would check but it doesn't.
Screenshots No screenshot to add.
Desktop (please complete the following information):