Skip to content

Commit

Permalink
fix: updated naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Liquidscroll authored and WhyPenguins committed Oct 19, 2024
1 parent ba319e5 commit ed19d73
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 67 deletions.
18 changes: 9 additions & 9 deletions coresdk/src/backend/interface_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,33 +581,33 @@ namespace splashkit_lib
mu_pop_id(ctx);
}

bool sk_interface_header(const string& text_label)
bool sk_interface_header(const string& label_text)
{
return mu_header(ctx, text_label.c_str());
return mu_header(ctx, label_text.c_str());
}

void sk_interface_label(const string& text_label)
void sk_interface_label(const string& label_text)
{
mu_label(ctx, text_label.c_str());
mu_label(ctx, label_text.c_str());
}

void sk_interface_text(const string& text)
{
mu_text(ctx, text.c_str());
}

bool sk_interface_button(const string& text_label, int icon)
bool sk_interface_button(const string& label_text, int icon)
{
update_elements_changed(mu_button_ex(ctx, text_label.c_str(), icon, MU_OPT_ALIGNCENTER));
update_elements_changed(mu_button_ex(ctx, label_text.c_str(), icon, MU_OPT_ALIGNCENTER));
return element_confirmed;
}

bool sk_interface_checkbox(const string& text_label, const bool& value)
bool sk_interface_checkbox(const string& label_text, const bool& value)
{
sk_interface_push_ptr_id((void*)&value);

int temp_value = value;
update_elements_changed(mu_checkbox(ctx, text_label.c_str(), &temp_value));
update_elements_changed(mu_checkbox(ctx, label_text.c_str(), &temp_value));

sk_interface_pop_id();
return temp_value;
Expand Down Expand Up @@ -929,4 +929,4 @@ namespace splashkit_lib
{
return interface_enabled;
}
}
}
10 changes: 5 additions & 5 deletions coresdk/src/backend/interface_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ namespace splashkit_lib
void sk_interface_push_ptr_id(void* ptr);
void sk_interface_pop_id();

bool sk_interface_header(const string& text_label);
void sk_interface_label(const string& text_label);
bool sk_interface_header(const string& label_text);
void sk_interface_label(const string& label_text);
void sk_interface_text(const string& text);
bool sk_interface_button(const string& text_label, int icon);
bool sk_interface_checkbox(const string& text_label, const bool& value);
bool sk_interface_button(const string& label_text, int icon);
bool sk_interface_checkbox(const string& label_text, const bool& value);
float sk_interface_slider(const float& value, float min_value, float max_value);
float sk_interface_number(const float& value, float step);
std::string sk_interface_text_box(const std::string& value);
Expand Down Expand Up @@ -113,4 +113,4 @@ namespace splashkit_lib
void sk_interface_set_enabled(bool enabled);
bool sk_interface_is_enabled();
}
#endif
#endif
46 changes: 23 additions & 23 deletions coresdk/src/coresdk/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,16 +730,16 @@ namespace splashkit_lib
_pop_container_stack(panel_type::column, "");
}

bool header(const string& text_label)
bool header(const string& label_text)
{
_interface_sanity_check();

bool open = sk_interface_header(text_label);
bool open = sk_interface_header(label_text);

return open;
}

void text_label(const string& text)
void label_element(const string& text)
{
_interface_sanity_check();

Expand All @@ -748,13 +748,13 @@ namespace splashkit_lib
_update_text_style();
}

void text_label(const string& text, const rectangle& rect)
void label_element(const string& text, const rectangle& rect)
{
_interface_sanity_check();

sk_interface_set_layout_next(rect, true);

text_label(text);
label_element(text);
}

void paragraph(const string& text, const rectangle& rect)
Expand All @@ -774,14 +774,14 @@ namespace splashkit_lib
_update_text_style();
}

bool button(const string& text_label, const string& text)
bool button(const string& label_text, const string& text)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
bool res = button(text);

leave_column();
Expand Down Expand Up @@ -889,14 +889,14 @@ namespace splashkit_lib
return bitmap_button(bmp, option_defaults());
}

bool bitmap_button(const string& text_label, bitmap bmp, drawing_options opts)
bool bitmap_button(const string& label_text, bitmap bmp, drawing_options opts)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);

bool res = _bitmap_button_internal(bmp, nullptr, opts);

Expand All @@ -905,9 +905,9 @@ namespace splashkit_lib
return res;
}

bool bitmap_button(const string& text_label, bitmap bmp)
bool bitmap_button(const string& label_text, bitmap bmp)
{
return bitmap_button(text_label, bmp, option_defaults());
return bitmap_button(label_text, bmp, option_defaults());
}

bool bitmap_button(bitmap bmp, const rectangle& rect, drawing_options opts)
Expand All @@ -920,14 +920,14 @@ namespace splashkit_lib
return bitmap_button(bmp, rect, option_defaults());
}

bool checkbox(const string& text_label, const string& text, const bool& value)
bool checkbox(const string& label_text, const string& text, const bool& value)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
bool res = checkbox(text, value);

leave_column();
Expand All @@ -954,14 +954,14 @@ namespace splashkit_lib
return checkbox(text, value);
}

float slider(const string& text_label, const float& value, float min_value, float max_value)
float slider(const string& label_text, const float& value, float min_value, float max_value)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
float res = slider(value, min_value, max_value);

leave_column();
Expand Down Expand Up @@ -1046,14 +1046,14 @@ namespace splashkit_lib
return temp_value;
}

color color_slider(const string& text_label, const color& clr)
color color_slider(const string& label_text, const color& clr)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
color res = color_slider(clr);

leave_column();
Expand All @@ -1074,14 +1074,14 @@ namespace splashkit_lib
return _color_slider(clr, false);
}

color hsb_color_slider(const string& text_label, const color& clr)
color hsb_color_slider(const string& label_text, const color& clr)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
color res = hsb_color_slider(clr);

leave_column();
Expand All @@ -1102,14 +1102,14 @@ namespace splashkit_lib
return _color_slider(clr, true);
}

float number_box(const string& text_label, const float& value, float step)
float number_box(const string& label_text, const float& value, float step)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
float res = number_box(value, step);

leave_column();
Expand All @@ -1132,14 +1132,14 @@ namespace splashkit_lib
return number_box(value, step);
}

std::string text_box(const string& text_label, const std::string& value)
std::string text_box(const string& label_text, const std::string& value)
{
_interface_sanity_check();

enter_column();
_two_column_layout();

splashkit_lib::text_label(text_label);
splashkit_lib::label_element(label_text);
std::string res = text_box(value);

leave_column();
Expand Down
Loading

0 comments on commit ed19d73

Please sign in to comment.