mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 11:22:17 -05:00
Changing int type
This commit is contained in:
parent
49e15d342d
commit
c0cd3b5400
@ -390,14 +390,14 @@ namespace SohImGui {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnhancementCombobox(const char* name, const char* ComboArray[], s16 FirstTimeValue = -1){
|
void EnhancementCombobox(const char* name, const char* ComboArray[], uint8_t FirstTimeValue = 0){
|
||||||
if (FirstTimeValue < 0){
|
if (FirstTimeValue <= 0){
|
||||||
FirstTimeValue = 0;
|
FirstTimeValue = 0;
|
||||||
}
|
}
|
||||||
s16 selected=CVar_GetS32(name, FirstTimeValue);
|
uint8_t selected=CVar_GetS32(name, FirstTimeValue);
|
||||||
s16 DefaultValue=selected;
|
uint8_t DefaultValue=selected;
|
||||||
if (ImGui::BeginCombo("##name", ComboArray[DefaultValue])) {
|
if (ImGui::BeginCombo("##name", ComboArray[DefaultValue])) {
|
||||||
s16 ComboxSize = sizeof(&ComboArray);
|
uint8_t ComboxSize = sizeof(&ComboArray);
|
||||||
for (uint8_t i = 0; i <= ComboxSize; i++) {
|
for (uint8_t i = 0; i <= ComboxSize; i++) {
|
||||||
if (strlen(ComboArray[i]) > 1) {
|
if (strlen(ComboArray[i]) > 1) {
|
||||||
if (ImGui::Selectable(ComboArray[i], i==selected)) {
|
if (ImGui::Selectable(ComboArray[i], i==selected)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user