Skip to content

Commit e7ee381

Browse files
authored
Merge pull request #82130 from Maleclypse/IMGUI-popup-per-ZS
IMGUI wish popup
2 parents c4e7e2a + e2b9464 commit e7ee381

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/wish.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -947,16 +947,13 @@ class wish_item_callback: public uilist_callback
947947
// Otherwise, edit the existing list of user-defined instance flags
948948
edit_flags = flags;
949949
}
950-
string_input_popup popup;
951-
popup
952-
.title( _( "Flags:" ) )
953-
.description( _( "UPPERCASE, no quotes, separate with spaces" ) )
954-
.max_length( 100 )
955-
.text( edit_flags )
956-
.query();
950+
string_input_popup_imgui popup( 34, edit_flags, _( "Flags:" ) );
951+
popup.set_description( _( "UPPERCASE, no quotes, separate with spaces" ) );
952+
popup.set_max_input_length( 100 );
953+
const std::string &rval = popup.query();
957954
// Save instance flags on this item (will be reset when selecting another item)
958-
if( popup.confirmed() ) {
959-
flags = popup.text();
955+
if( !popup.cancelled() ) {
956+
flags = rval;
960957
return true;
961958
}
962959
}

0 commit comments

Comments
 (0)