Forráskód Böngészése

Remove unnecessary comments

Robert Winkler 5 éve
szülő
commit
ab6aee42d8
1 módosított fájl, 0 hozzáadás és 250 törlés
  1. 0 250
      demo/style_configurator.c

+ 0 - 250
demo/style_configurator.c

@@ -21,8 +21,6 @@ static const char* symbols[NK_SYMBOL_MAX] =
     "MINUS"
 };
 
-
-
 static void
 style_rgb(struct nk_context* ctx, const char* name, struct nk_color* color)
 {
@@ -110,9 +108,6 @@ static void
 style_text(struct nk_context* ctx, struct nk_style_text* out_style)
 {
 	struct nk_style_text text = *out_style;
-	//text = &style->text;
-	//text->color = table[NK_COLOR_TEXT];
-	//text->padding = nk_vec2(0,0);
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 	style_rgb(ctx, "Color:", &text.color);
@@ -126,24 +121,6 @@ static void
 style_button(struct nk_context* ctx, struct nk_style_button* out_style, struct nk_style_button** duplicate_styles, int n_dups)
 {
 	struct nk_style_button button = *out_style;
-	//button = &style->button;
-	//button->normal          = nk_style_item_color(table[NK_COLOR_BUTTON]);
-	//button->hover           = nk_style_item_color(table[NK_COLOR_BUTTON_HOVER]);
-	//button->active          = nk_style_item_color(table[NK_COLOR_BUTTON_ACTIVE]);
-	//button->border_color    = table[NK_COLOR_BORDER];
-	//button->text_background = table[NK_COLOR_BUTTON];
-	//button->text_normal     = table[NK_COLOR_TEXT];
-	//button->text_hover      = table[NK_COLOR_TEXT];
-	//button->text_active     = table[NK_COLOR_TEXT];
-	//button->padding         = nk_vec2(2.0f,2.0f);
-	//button->image_padding   = nk_vec2(0.0f,0.0f);
-	//button->touch_padding   = nk_vec2(0.0f, 0.0f);
-	//button->userdata        = nk_handle_ptr(0);
-	//button->text_alignment  = NK_TEXT_CENTERED;
-	//button->border          = 1.0f;
-	//button->rounding        = 4.0f;
-	//button->draw_begin      = 0;
-	//button->draw_end        = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 	style_item_color(ctx, "Normal:", &button.normal);
@@ -193,12 +170,6 @@ NK_TEXT_RIGHT       = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_RIGHT
 	nk_property_float(ctx, "#Border:", -100.0f, &button.border, 100.0f, 1,0.5f);
 	nk_property_float(ctx, "#Rounding:", -100.0f, &button.rounding, 100.0f, 1,0.5f);
 
-	//
-	// optional user callback stuff
-	//button->userdata        = nk_handle_ptr(0);
-	//button->draw_begin      = 0;
-	//button->draw_end        = 0;
-
 	*out_style = button;
 	if (duplicate_styles) {
 		for (int i=0; i<n_dups; ++i) {
@@ -211,23 +182,6 @@ NK_TEXT_RIGHT       = NK_TEXT_ALIGN_MIDDLE|NK_TEXT_ALIGN_RIGHT
 static void style_toggle(struct nk_context* ctx, struct nk_style_toggle* out_style)
 {
 	struct nk_style_toggle toggle = *out_style;
-	//toggle = &style->checkbox;
-	//toggle->normal          = nk_style_item_color(table[NK_COLOR_TOGGLE]);
-	//toggle->hover           = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
-	//toggle->active          = nk_style_item_color(table[NK_COLOR_TOGGLE_HOVER]);
-	//toggle->cursor_normal   = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
-	//toggle->cursor_hover    = nk_style_item_color(table[NK_COLOR_TOGGLE_CURSOR]);
-	//toggle->userdata        = nk_handle_ptr(0);
-	//toggle->text_background = table[NK_COLOR_WINDOW];
-	//toggle->text_normal     = table[NK_COLOR_TEXT];
-	//toggle->text_hover      = table[NK_COLOR_TEXT];
-	//toggle->text_active     = table[NK_COLOR_TEXT];
-	//toggle->padding         = nk_vec2(2.0f, 2.0f);
-	//toggle->touch_padding   = nk_vec2(0,0);
-	//toggle->border_color    = nk_rgba(0,0,0,0);
-	//toggle->border          = 0.0f;
-	//toggle->spacing         = 4;
-	//
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -257,26 +211,6 @@ static void
 style_selectable(struct nk_context* ctx, struct nk_style_selectable* out_style)
 {
 	struct nk_style_selectable select = *out_style;
-	//select = &style->selectable;
-	//select->normal          = nk_style_item_color(table[NK_COLOR_SELECT]);
-	//select->hover           = nk_style_item_color(table[NK_COLOR_SELECT]);
-	//select->pressed         = nk_style_item_color(table[NK_COLOR_SELECT]);
-	//select->normal_active   = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
-	//select->hover_active    = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
-	//select->pressed_active  = nk_style_item_color(table[NK_COLOR_SELECT_ACTIVE]);
-	//select->text_normal     = table[NK_COLOR_TEXT];
-	//select->text_hover      = table[NK_COLOR_TEXT];
-	//select->text_pressed    = table[NK_COLOR_TEXT];
-	//select->text_normal_active  = table[NK_COLOR_TEXT];
-	//select->text_hover_active   = table[NK_COLOR_TEXT];
-	//select->text_pressed_active = table[NK_COLOR_TEXT];
-	//select->padding         = nk_vec2(2.0f,2.0f);
-	//select->image_padding   = nk_vec2(2.0f,2.0f);
-	//select->touch_padding   = nk_vec2(0,0);
-	//select->userdata        = nk_handle_ptr(0);
-	//select->rounding        = 0.0f;
-	//select->draw_begin      = 0;
-	//select->draw_end        = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -308,28 +242,6 @@ static void
 style_slider(struct nk_context* ctx, struct nk_style_slider* out_style)
 {
 	struct nk_style_slider slider = *out_style;
-	//slider = &style->slider;
-	//slider->normal          = nk_style_item_hide();
-	//slider->hover           = nk_style_item_hide();
-	//slider->active          = nk_style_item_hide();
-	//slider->bar_normal      = table[NK_COLOR_SLIDER];
-	//slider->bar_hover       = table[NK_COLOR_SLIDER];
-	//slider->bar_active      = table[NK_COLOR_SLIDER];
-	//slider->bar_filled      = table[NK_COLOR_SLIDER_CURSOR];
-	//slider->cursor_normal   = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);
-	//slider->cursor_hover    = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);
-	//slider->cursor_active   = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);
-	//slider->inc_symbol      = NK_SYMBOL_TRIANGLE_RIGHT;
-	//slider->dec_symbol      = NK_SYMBOL_TRIANGLE_LEFT;
-	//slider->cursor_size     = nk_vec2(16,16);
-	//slider->padding         = nk_vec2(2,2);
-	//slider->spacing         = nk_vec2(2,2);
-	//slider->userdata        = nk_handle_ptr(0);
-	//slider->show_buttons    = nk_false;
-	//slider->bar_height      = 8;
-	//slider->rounding        = 0;
-	//slider->draw_begin      = 0;
-	//slider->draw_end        = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -380,23 +292,6 @@ static void
 style_progress(struct nk_context* ctx, struct nk_style_progress* out_style)
 {
 	struct nk_style_progress prog = *out_style;
-	//prog = &style->progress;
-	//prog->normal            = nk_style_item_color(table[NK_COLOR_SLIDER]);
-	//prog->hover             = nk_style_item_color(table[NK_COLOR_SLIDER]);
-	//prog->active            = nk_style_item_color(table[NK_COLOR_SLIDER]);
-	//prog->cursor_normal     = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR]);
-	//prog->cursor_hover      = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_HOVER]);
-	//prog->cursor_active     = nk_style_item_color(table[NK_COLOR_SLIDER_CURSOR_ACTIVE]);
-	//prog->border_color      = nk_rgba(0,0,0,0);
-	//prog->cursor_border_color = nk_rgba(0,0,0,0);
-	//prog->userdata          = nk_handle_ptr(0);
-	//prog->padding           = nk_vec2(4,4);
-	//prog->rounding          = 0;
-	//prog->border            = 0;
-	//prog->cursor_rounding   = 0;
-	//prog->cursor_border     = 0;
-	//prog->draw_begin        = 0;
-	//prog->draw_end          = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -426,27 +321,6 @@ static void
 style_scrollbars(struct nk_context* ctx, struct nk_style_scrollbar* out_style, struct nk_style_scrollbar** duplicate_styles, int n_dups)
 {
 	struct nk_style_scrollbar scroll = *out_style;
-	//scroll = &style->scrollh;
-	//scroll->normal          = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
-	//scroll->hover           = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
-	//scroll->active          = nk_style_item_color(table[NK_COLOR_SCROLLBAR]);
-	//scroll->cursor_normal   = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR]);
-	//scroll->cursor_hover    = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_HOVER]);
-	//scroll->cursor_active   = nk_style_item_color(table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE]);
-	//scroll->dec_symbol      = NK_SYMBOL_CIRCLE_SOLID;
-	//scroll->inc_symbol      = NK_SYMBOL_CIRCLE_SOLID;
-	//scroll->userdata        = nk_handle_ptr(0);
-	//scroll->border_color    = table[NK_COLOR_SCROLLBAR];
-	//scroll->cursor_border_color = table[NK_COLOR_SCROLLBAR];
-	//scroll->padding         = nk_vec2(0,0);
-	//scroll->show_buttons    = nk_false;
-	//scroll->border          = 0;
-	//scroll->rounding        = 0;
-	//scroll->border_cursor   = 0;
-	//scroll->rounding_cursor = 0;
-	//scroll->draw_begin      = 0;
-	//scroll->draw_end        = 0;
-	//style->scrollv = style->scrollh;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -492,9 +366,6 @@ style_scrollbars(struct nk_context* ctx, struct nk_style_scrollbar* out_style, s
 		}
 	}
 
-
-	//style->scrollv = style->scrollh;
-
 	*out_style = scroll;
 	if (duplicate_styles) {
 		for (int i=0; i<n_dups; ++i) {
@@ -507,29 +378,6 @@ static void
 style_edit(struct nk_context* ctx, struct nk_style_edit* out_style)
 {
 	struct nk_style_edit edit = *out_style;
-	//edit = &style->edit;
-	//edit->normal            = nk_style_item_color(table[NK_COLOR_EDIT]);
-	//edit->hover             = nk_style_item_color(table[NK_COLOR_EDIT]);
-	//edit->active            = nk_style_item_color(table[NK_COLOR_EDIT]);
-	//edit->cursor_normal     = table[NK_COLOR_TEXT];
-	//edit->cursor_hover      = table[NK_COLOR_TEXT];
-	//edit->cursor_text_normal= table[NK_COLOR_EDIT];
-	//edit->cursor_text_hover = table[NK_COLOR_EDIT];
-	//edit->border_color      = table[NK_COLOR_BORDER];
-	//edit->text_normal       = table[NK_COLOR_TEXT];
-	//edit->text_hover        = table[NK_COLOR_TEXT];
-	//edit->text_active       = table[NK_COLOR_TEXT];
-	//edit->selected_normal   = table[NK_COLOR_TEXT];
-	//edit->selected_hover    = table[NK_COLOR_TEXT];
-	//edit->selected_text_normal  = table[NK_COLOR_EDIT];
-	//edit->selected_text_hover   = table[NK_COLOR_EDIT];
-	//edit->scrollbar_size    = nk_vec2(10,10);
-	//edit->scrollbar         = style->scrollv;
-	//edit->padding           = nk_vec2(4,4);
-	//edit->row_padding       = 2;
-	//edit->cursor_size       = 4;
-	//edit->border            = 1;
-	//edit->rounding          = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -570,23 +418,6 @@ style_property(struct nk_context* ctx, struct nk_style_property* out_style)
 {
 	struct nk_style_property property = *out_style;
 
-	//property = &style->property;
-	//property->normal        = nk_style_item_color(table[NK_COLOR_PROPERTY]);
-	//property->hover         = nk_style_item_color(table[NK_COLOR_PROPERTY]);
-	//property->active        = nk_style_item_color(table[NK_COLOR_PROPERTY]);
-	//property->border_color  = table[NK_COLOR_BORDER];
-	//property->label_normal  = table[NK_COLOR_TEXT];
-	//property->label_hover   = table[NK_COLOR_TEXT];
-	//property->label_active  = table[NK_COLOR_TEXT];
-	//property->sym_left      = NK_SYMBOL_TRIANGLE_LEFT;
-	//property->sym_right     = NK_SYMBOL_TRIANGLE_RIGHT;
-	//property->userdata      = nk_handle_ptr(0);
-	//property->padding       = nk_vec2(4,4);
-	//property->border        = 1;
-	//property->rounding      = 10;
-	//property->draw_begin    = 0;
-	//property->draw_end      = 0;
-
 	nk_layout_row_dynamic(ctx, 30, 2);
 
 	style_item_color(ctx, "Normal:", &property.normal);
@@ -629,14 +460,6 @@ static void
 style_chart(struct nk_context* ctx, struct nk_style_chart* out_style)
 {
 	struct nk_style_chart chart = *out_style;
-	//chart = &style->chart;
-	//chart->background       = nk_style_item_color(table[NK_COLOR_CHART]);
-	//chart->border_color     = table[NK_COLOR_BORDER];
-	//chart->selected_color   = table[NK_COLOR_CHART_COLOR_HIGHLIGHT];
-	//chart->color            = table[NK_COLOR_CHART_COLOR];
-	//chart->padding          = nk_vec2(4,4);
-	//chart->border           = 0;
-	//chart->rounding         = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -658,22 +481,6 @@ static void
 style_combo(struct nk_context* ctx, struct nk_style_combo* out_style)
 {
 	struct nk_style_combo combo = *out_style;
-	//combo = &style->combo;
-	//combo->normal           = nk_style_item_color(table[NK_COLOR_COMBO]);
-	//combo->hover            = nk_style_item_color(table[NK_COLOR_COMBO]);
-	//combo->active           = nk_style_item_color(table[NK_COLOR_COMBO]);
-	//combo->border_color     = table[NK_COLOR_BORDER];
-	//combo->label_normal     = table[NK_COLOR_TEXT];
-	//combo->label_hover      = table[NK_COLOR_TEXT];
-	//combo->label_active     = table[NK_COLOR_TEXT];
-	//combo->sym_normal       = NK_SYMBOL_TRIANGLE_DOWN;
-	//combo->sym_hover        = NK_SYMBOL_TRIANGLE_DOWN;
-	//combo->sym_active       = NK_SYMBOL_TRIANGLE_DOWN;
-	//combo->content_padding  = nk_vec2(4,4);
-	//combo->button_padding   = nk_vec2(0,4);
-	//combo->spacing          = nk_vec2(4,0);
-	//combo->border           = 1;
-	//combo->rounding         = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -707,17 +514,6 @@ static void
 style_tab(struct nk_context* ctx, struct nk_style_tab* out_style)
 {
 	struct nk_style_tab tab = *out_style;
-	//tab = &style->tab;
-	//tab->background         = nk_style_item_color(table[NK_COLOR_TAB_HEADER]);
-	//tab->border_color       = table[NK_COLOR_BORDER];
-	//tab->text               = table[NK_COLOR_TEXT];
-	//tab->sym_minimize       = NK_SYMBOL_TRIANGLE_RIGHT;
-	//tab->sym_maximize       = NK_SYMBOL_TRIANGLE_DOWN;
-	//tab->padding            = nk_vec2(4,4);
-	//tab->spacing            = nk_vec2(4,4);
-	//tab->indent             = 10.0f;
-	//tab->border             = 1;
-	//tab->rounding           = 0;
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -749,19 +545,6 @@ static void
 style_window_header(struct nk_context* ctx, struct nk_style_window_header* out_style)
 {
 	struct nk_style_window_header header = *out_style;
-	//win->header.align = NK_HEADER_RIGHT;
-	//win->header.close_symbol = NK_SYMBOL_X;
-	//win->header.minimize_symbol = NK_SYMBOL_MINUS;
-	//win->header.maximize_symbol = NK_SYMBOL_PLUS;
-	//win->header.normal = nk_style_item_color(table[NK_COLOR_HEADER]);
-	//win->header.hover = nk_style_item_color(table[NK_COLOR_HEADER]);
-	//win->header.active = nk_style_item_color(table[NK_COLOR_HEADER]);
-	//win->header.label_normal = table[NK_COLOR_TEXT];
-	//win->header.label_hover = table[NK_COLOR_TEXT];
-	//win->header.label_active = table[NK_COLOR_TEXT];
-	//win->header.label_padding = nk_vec2(4,4);
-	//win->header.padding = nk_vec2(4,4);
-	//win->header.spacing = nk_vec2(0,0);
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -807,38 +590,6 @@ static void
 style_window(struct nk_context* ctx, struct nk_style_window* out_style)
 {
 	struct nk_style_window win = *out_style;
-	//win->background = table[NK_COLOR_WINDOW];
-	//win->fixed_background = nk_style_item_color(table[NK_COLOR_WINDOW]);
-	//win->border_color = table[NK_COLOR_BORDER];
-	//win->popup_border_color = table[NK_COLOR_BORDER];
-	//win->combo_border_color = table[NK_COLOR_BORDER];
-	//win->contextual_border_color = table[NK_COLOR_BORDER];
-	//win->menu_border_color = table[NK_COLOR_BORDER];
-	//win->group_border_color = table[NK_COLOR_BORDER];
-	//win->tooltip_border_color = table[NK_COLOR_BORDER];
-	//win->scaler = nk_style_item_color(table[NK_COLOR_TEXT]);
-	//
-	//win->rounding = 0.0f;
-	//win->spacing = nk_vec2(4,4);
-	//win->scrollbar_size = nk_vec2(10,10);
-	//win->min_size = nk_vec2(64,64);
-	//
-	//win->combo_border = 1.0f;
-	//win->contextual_border = 1.0f;
-	//win->menu_border = 1.0f;
-	//win->group_border = 1.0f;
-	//win->tooltip_border = 1.0f;
-	//win->popup_border = 1.0f;
-	//win->border = 2.0f;
-	//win->min_row_height_padding = 8;
-	//
-	//win->padding = nk_vec2(4,4);
-	//win->group_padding = nk_vec2(4,4);
-	//win->popup_padding = nk_vec2(4,4);
-	//win->combo_padding = nk_vec2(4,4);
-	//win->contextual_padding = nk_vec2(4,4);
-	//win->menu_padding = nk_vec2(4,4);
-	//win->tooltip_padding = nk_vec2(4,4);
 
 	nk_layout_row_dynamic(ctx, 30, 2);
 
@@ -899,7 +650,6 @@ style_configurator(struct nk_context *ctx)
 	nk_flags window_flags = 0;
 	int minimizable = nk_true;
 
-
 	/* window flags */
 	window_flags = 0;
 	if (border) window_flags |= NK_WINDOW_BORDER;