Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CDropDown.cpp
Show All 24 Lines | |||||
#include "lib/timer.h" | #include "lib/timer.h" | ||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "soundmanager/ISoundManager.h" | #include "soundmanager/ISoundManager.h" | ||||
CDropDown::CDropDown(CGUI* pGUI) | CDropDown::CDropDown(CGUI* pGUI) | ||||
: CList(pGUI), IGUIObject(pGUI), | : CList(pGUI), IGUIObject(pGUI), | ||||
m_Open(false), m_HideScrollBar(false), m_ElementHighlight(-1) | m_Open(false), m_HideScrollBar(false), m_ElementHighlight(-1) | ||||
{ | { | ||||
} | |||||
CDropDown::~CDropDown() | |||||
{ | |||||
} | |||||
void CDropDown::AddSettings() | |||||
{ | |||||
AddSetting(GUIST_float, "button_width"); | AddSetting(GUIST_float, "button_width"); | ||||
AddSetting(GUIST_float, "dropdown_size"); | AddSetting(GUIST_float, "dropdown_size"); | ||||
AddSetting(GUIST_float, "dropdown_buffer"); | AddSetting(GUIST_float, "dropdown_buffer"); | ||||
AddSetting(GUIST_uint, "minimum_visible_items"); | AddSetting(GUIST_uint, "minimum_visible_items"); | ||||
// AddSetting(GUIST_CStrW, "font"); | // AddSetting(GUIST_CStrW, "font"); | ||||
AddSetting(GUIST_CStrW, "sound_closed"); | AddSetting(GUIST_CStrW, "sound_closed"); | ||||
AddSetting(GUIST_CStrW, "sound_disabled"); | AddSetting(GUIST_CStrW, "sound_disabled"); | ||||
AddSetting(GUIST_CStrW, "sound_enter"); | AddSetting(GUIST_CStrW, "sound_enter"); | ||||
Show All 9 Lines | // AddSetting(GUIST_CStrW, "font"); | ||||
AddSetting(GUIST_EVAlign, "text_valign"); | AddSetting(GUIST_EVAlign, "text_valign"); | ||||
// Add these in CList! And implement TODO | // Add these in CList! And implement TODO | ||||
//AddSetting(GUIST_CGUIColor, "textcolor_over"); | //AddSetting(GUIST_CGUIColor, "textcolor_over"); | ||||
//AddSetting(GUIST_CGUIColor, "textcolor_pressed"); | //AddSetting(GUIST_CGUIColor, "textcolor_pressed"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor_selected"); | AddSetting(GUIST_CGUIColor, "textcolor_selected"); | ||||
AddSetting(GUIST_CGUIColor, "textcolor_disabled"); | AddSetting(GUIST_CGUIColor, "textcolor_disabled"); | ||||
CList::AddSettings(); | |||||
// Scrollbar is forced to be true. | // Scrollbar is forced to be true. | ||||
GUI<bool>::SetSetting(this, "scrollbar", true); | GUI<bool>::SetSetting(this, "scrollbar", true); | ||||
} | } | ||||
CDropDown::~CDropDown() | |||||
{ | |||||
} | |||||
void CDropDown::SetupText() | void CDropDown::SetupText() | ||||
{ | { | ||||
SetupListRect(); | SetupListRect(); | ||||
CList::SetupText(); | CList::SetupText(); | ||||
} | } | ||||
void CDropDown::UpdateCachedSize() | void CDropDown::UpdateCachedSize() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator