MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / addCancelButton

Method addCancelButton

source/ui/controls/baseDlg.cpp:137–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void BaseDlg::addCancelButton() {
138 float buttonArea = ImGui::CalcTextSize(c_getTranslation(Msg::GENERIC_DLG_CANCEL)).x+ImGui::GetStyle().FramePadding.x*2;
139 ImGui::SetCursorPos(ImVec2((float)(this->width - buttonArea - getOuterFramePadding()), getButtonRowY()));
140
141 if (ImGui::Button(c_getTranslation(Msg::GENERIC_DLG_CANCEL))) {
142 this->done();
143 }
144}
145
146void BaseDlg::onOk(bool buttonClicked) {
147 if (buttonClicked) {

Callers 1

runMethod · 0.80

Calls 3

doneMethod · 0.95
c_getTranslationFunction · 0.85
ImVec2Class · 0.85

Tested by

no test coverage detected