ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.41k stars 10.34k forks source link

Slider available when checkbox checked #1652

Closed Haterul closed 6 years ago

Haterul commented 6 years ago

Hello, so I have a question. Is it possible to make that sliders to be available only when a checkbox is checked? slider

Like, FOV View and FOV Model View to be visible/available only when FOV Changer checkbox is checked?

ocornut commented 6 years ago

Yes, you can use an if statement.

Haterul commented 6 years ago

Can you give me an example, please?

ocornut commented 6 years ago

Please refer to C/C++ books or tutorials about how to use if statements, here isn’t the place sorry.

ocornut commented 6 years ago

Apologies to myself, I didn't immediately realize this was another case of CS GO cheating. Sorry but #1586

ocornut commented 6 years ago

Edited with details and for clarity @aylaylay It's not my business what they use it for, it's my business to decide if want to spend time helping people.

The amount of support requests are already overwhelming, I'm doing this by myself, and there is a huge overlap between cheaters and: ill-defined time-wasting requests from entitled people who have no interest in programming and asking me to solve their homework while making it as hard as possible to me to mind-read them and guess what their code looks like.

Add to the equation that their project are unethical, it's an easy line to draw really: I can't give out my time away helping them.

ice1000 commented 6 years ago

@Haterul if u can spend 1 sec on reading the demo n u'll know:

static bool isChecked = false;
ImGui::Checkbox("FOV Changer", &isChecked);
if (isChecked) {
  ImGui::SliderInt // pass your arguments
}
dextdev commented 2 years ago

learn c++