Changeset - r26427:197f9bcb0c32
[Not reviewed]
master
0 2 0
Peter Nelson - 2 years ago 2022-09-23 21:47:50
peter1138@openttd.org
Change: Default widget text colour to black.

TC_FROMSTRING really means blue, and we almost never actually use
blue text.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -499,25 +499,25 @@ struct NetworkChatWindow : public Window
 
	void OnInvalidateData(int data = 0, bool gui_scope = true) override
 
	{
 
		if (data == this->dest) this->Close();
 
	}
 
};
 

	
 
/** The widgets of the chat window. */
 
static const NWidgetPart _nested_chat_window_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY, WID_NC_CLOSE),
 
		NWidget(WWT_PANEL, COLOUR_GREY, WID_NC_BACKGROUND),
 
			NWidget(NWID_HORIZONTAL),
 
				NWidget(WWT_TEXT, COLOUR_GREY, WID_NC_DESTINATION), SetMinimalSize(62, 12), SetPadding(1, 0, 1, 0), SetTextColour(TC_BLACK), SetAlignment(SA_TOP | SA_RIGHT), SetDataTip(STR_NULL, STR_NULL),
 
				NWidget(WWT_TEXT, COLOUR_GREY, WID_NC_DESTINATION), SetMinimalSize(62, 12), SetPadding(1, 0, 1, 0), SetAlignment(SA_TOP | SA_RIGHT), SetDataTip(STR_NULL, STR_NULL),
 
				NWidget(WWT_EDITBOX, COLOUR_GREY, WID_NC_TEXTBOX), SetMinimalSize(100, 12), SetPadding(1, 0, 1, 0), SetResize(1, 0),
 
																	SetDataTip(STR_NETWORK_CHAT_OSKTITLE, STR_NULL),
 
				NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_NC_SENDBUTTON), SetMinimalSize(62, 12), SetPadding(1, 0, 1, 0), SetDataTip(STR_NETWORK_CHAT_SEND, STR_NULL),
 
			EndContainer(),
 
		EndContainer(),
 
	EndContainer(),
 
};
 

	
 
/** The description of the chat window. */
 
static WindowDesc _chat_window_desc(
 
	WDP_MANUAL, nullptr, 0, 0,
 
	WC_SEND_NETWORK_MSG, WC_NONE,
src/widget.cpp
Show inline comments
 
@@ -931,25 +931,25 @@ void NWidgetResizeBase::AssignSizePositi
 
 * @param fill_x      Default horizontal filling.
 
 * @param fill_y      Default vertical filling.
 
 * @param widget_data Data component of the widget. @see Widget::data
 
 * @param tool_tip    Tool tip of the widget. @see Widget::tooltips
 
 */
 
NWidgetCore::NWidgetCore(WidgetType tp, Colours colour, uint fill_x, uint fill_y, uint32 widget_data, StringID tool_tip) : NWidgetResizeBase(tp, fill_x, fill_y)
 
{
 
	this->colour = colour;
 
	this->index = -1;
 
	this->widget_data = widget_data;
 
	this->tool_tip = tool_tip;
 
	this->scrollbar_index = -1;
 
	this->text_colour = TC_FROMSTRING;
 
	this->text_colour = TC_BLACK;
 
	this->align = SA_CENTER;
 
}
 

	
 
/**
 
 * Set index of the nested widget in the widget array.
 
 * @param index Index to use.
 
 */
 
void NWidgetCore::SetIndex(int index)
 
{
 
	assert(index >= 0);
 
	this->index = index;
 
}
0 comments (0 inline, 0 general)