mirror of
https://github.com/MCLx86/xtreemtest.git
synced 2024-11-24 19:22:13 +01:00
Title menu improvements
This commit is contained in:
parent
78b702ecf5
commit
a820a06bfa
@ -126,9 +126,9 @@ local function init_globals()
|
||||
end]]
|
||||
|
||||
--ui.set_default("maintab")
|
||||
check_new_version()
|
||||
--check_new_version()
|
||||
--tv_main:show()
|
||||
ui.update()
|
||||
--ui.update()
|
||||
end
|
||||
|
||||
init_globals()
|
||||
|
@ -208,7 +208,7 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
|
||||
while (m_rendering_engine->run() && !*kill &&
|
||||
!g_gamecallback->shutdown_requested) {
|
||||
// Set the window caption
|
||||
const wchar_t *text = wgettext("Main Menu");
|
||||
const wchar_t *text = wgettext("Title Menu");
|
||||
m_rendering_engine->get_raw_device()->
|
||||
setWindowCaption((utf8_to_wide(PROJECT_NAME_C) +
|
||||
L" " + utf8_to_wide(g_version_hash) +
|
||||
@ -224,11 +224,9 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
|
||||
custom gui elements directly on the screen.
|
||||
Otherwise they won't be automatically drawn.
|
||||
*/
|
||||
guiroot = m_rendering_engine->get_gui_env()->addStaticText(L"",
|
||||
core::rect<s32>(0, 0, 10000, 10000));
|
||||
guiroot = m_rendering_engine->get_gui_env()->addStaticText(L"", core::rect<s32>(0, 0, 10000, 10000));
|
||||
|
||||
bool game_has_run = launch_game(error_message, reconnect_requested,
|
||||
start_data, cmd_args);
|
||||
bool game_has_run = launch_game(error_message, reconnect_requested, start_data, cmd_args);
|
||||
|
||||
// Reset the reconnect_requested flag
|
||||
reconnect_requested = false;
|
||||
|
@ -106,8 +106,7 @@ void GUIBox::draw()
|
||||
|
||||
video::IVideoDriver *driver = Environment->getVideoDriver();
|
||||
|
||||
driver->draw2DRectangle(main_rect, m_colors[0], m_colors[1], m_colors[3],
|
||||
m_colors[2], &AbsoluteClippingRect);
|
||||
driver->draw2DRectangle(main_rect, m_colors[0], m_colors[1], m_colors[3], m_colors[2], &AbsoluteClippingRect);
|
||||
|
||||
for (size_t i = 0; i <= 3; i++)
|
||||
driver->draw2DRectangle(m_bordercolors[i], border_rects[i],
|
||||
|
@ -20,7 +20,7 @@ using namespace irr;
|
||||
using namespace gui;
|
||||
|
||||
// Multiply with a color to get the default corresponding hovered color
|
||||
#define COLOR_HOVERED_MOD 1.25f
|
||||
#define COLOR_HOVERED_MOD 2.f
|
||||
|
||||
// Multiply with a color to get the default corresponding pressed color
|
||||
#define COLOR_PRESSED_MOD 0.85f
|
||||
@ -46,6 +46,7 @@ GUIButton::GUIButton(IGUIEnvironment* environment, IGUIElement* parent,
|
||||
// PATCH
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
Colors[i] = Environment->getSkin()->getColor((EGUI_DEFAULT_COLOR)i);
|
||||
//Colors[i] = video::SColor(255, 0, 255, 255);
|
||||
}
|
||||
StaticText = gui::StaticText::add(Environment, Text.c_str(), core::rect<s32>(0,0,rectangle.getWidth(),rectangle.getHeight()), false, false, this, id);
|
||||
StaticText->setTextAlignment(EGUIA_CENTER, EGUIA_CENTER);
|
||||
@ -646,10 +647,9 @@ GUIButton* GUIButton::addButton(IGUIEnvironment *environment,
|
||||
void GUIButton::setColor(video::SColor color)
|
||||
{
|
||||
BgColor = color;
|
||||
|
||||
float d = 0.65f;
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
video::SColor base = Environment->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
|
||||
video::SColor base = video::SColor(255, 0, 255, 255); //Environment->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
|
||||
Colors[i] = base.getInterpolated(color, d);
|
||||
}
|
||||
}
|
||||
@ -696,8 +696,7 @@ void GUIButton::setFromStyle(const StyleSpec& style)
|
||||
} else {
|
||||
BgColor = video::SColor(255, 255, 255, 255);
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
video::SColor base =
|
||||
Environment->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i);
|
||||
video::SColor base = Environment->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); //video::SColor(255, 15 * i, 15 * i, 40 * i);
|
||||
if (pressed) {
|
||||
Colors[i] = multiplyColorValue(base, COLOR_PRESSED_MOD);
|
||||
} else if (hovered) {
|
||||
|
@ -417,7 +417,7 @@ void GUIEngine::drawBackground(video::IVideoDriver *driver)
|
||||
|
||||
/* If no texture, draw background of solid color */
|
||||
if(!texture){
|
||||
video::SColor color(255,80,58,37);
|
||||
video::SColor color(255,50,58,87);
|
||||
core::rect<s32> rect(0, 0, screensize.X, screensize.Y);
|
||||
driver->draw2DRectangle(color, rect, NULL);
|
||||
return;
|
||||
|
@ -1020,6 +1020,9 @@ void GUIFormSpecMenu::parseButton(parserData* data, const std::string &element,
|
||||
|
||||
GUIButton *e = GUIButton::addButton(Environment, rect, m_tsrc,
|
||||
data->current_parent, spec.fid, spec.flabel.c_str());
|
||||
|
||||
//just a test -- migdyn
|
||||
e->setColor(video::SColor(255, 5, 255, 255));
|
||||
|
||||
auto style = getStyleForElement(type, name, (type != "button") ? "button" : "");
|
||||
|
||||
|
@ -27,30 +27,34 @@ GUISkin::GUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
|
||||
|
||||
if ((Type == EGST_WINDOWS_CLASSIC) || (Type == EGST_WINDOWS_METALLIC))
|
||||
{
|
||||
Colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,50);
|
||||
Colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,130);
|
||||
Colors[EGDC_3D_FACE] = video::SColor(220,100,100,100);
|
||||
Colors[0] = video::SColor(101, 250, 250, 200);
|
||||
Colors[1] = video::SColor(101, 250, 250, 200);
|
||||
Colors[2] = video::SColor(101, 250, 250, 200);
|
||||
Colors[3] = video::SColor(101, 250, 250, 200);
|
||||
Colors[EGDC_3D_DARK_SHADOW] = video::SColor(101,50,50,200);
|
||||
Colors[EGDC_3D_SHADOW] = video::SColor(101,130,130,230);
|
||||
Colors[EGDC_3D_FACE] = video::SColor(220,0,0,60);
|
||||
Colors[EGDC_3D_HIGH_LIGHT] = video::SColor(101,255,255,255);
|
||||
Colors[EGDC_3D_LIGHT] = video::SColor(101,210,210,210);
|
||||
Colors[EGDC_3D_LIGHT] = video::SColor(101,110,110,255);
|
||||
Colors[EGDC_ACTIVE_BORDER] = video::SColor(101,16,14,115);
|
||||
Colors[EGDC_ACTIVE_CAPTION] = video::SColor(255,255,255,255);
|
||||
Colors[EGDC_APP_WORKSPACE] = video::SColor(101,100,100,100);
|
||||
Colors[EGDC_APP_WORKSPACE] = video::SColor(101,80,80,255);
|
||||
Colors[EGDC_BUTTON_TEXT] = video::SColor(240,10,10,10);
|
||||
Colors[EGDC_GRAY_TEXT] = video::SColor(240,130,130,130);
|
||||
Colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,107);
|
||||
Colors[EGDC_HIGH_LIGHT] = video::SColor(101,8,36,207);
|
||||
Colors[EGDC_HIGH_LIGHT_TEXT] = video::SColor(240,255,255,255);
|
||||
Colors[EGDC_INACTIVE_BORDER] = video::SColor(101,165,165,165);
|
||||
Colors[EGDC_INACTIVE_CAPTION] = video::SColor(255,30,30,30);
|
||||
Colors[EGDC_TOOLTIP] = video::SColor(200,0,0,0);
|
||||
Colors[EGDC_TOOLTIP_BACKGROUND] = video::SColor(200,255,255,225);
|
||||
Colors[EGDC_SCROLLBAR] = video::SColor(101,230,230,230);
|
||||
Colors[EGDC_WINDOW] = video::SColor(101,255,255,255);
|
||||
Colors[EGDC_SCROLLBAR] = video::SColor(101,90,130,255);
|
||||
Colors[EGDC_WINDOW] = video::SColor(101,25,5,255);
|
||||
Colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10);
|
||||
Colors[EGDC_ICON] = video::SColor(200,255,255,255);
|
||||
Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107);
|
||||
Colors[EGDC_GRAY_WINDOW_SYMBOL] = video::SColor(240,100,100,100);
|
||||
Colors[EGDC_EDITABLE] = video::SColor(255,255,255,255);
|
||||
Colors[EGDC_GRAY_EDITABLE] = video::SColor(255,120,120,120);
|
||||
Colors[EGDC_GRAY_EDITABLE] = video::SColor(255,250,250,250);
|
||||
Colors[EGDC_FOCUSED_EDITABLE] = video::SColor(255,240,240,255);
|
||||
|
||||
|
||||
@ -72,13 +76,13 @@ GUISkin::GUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
|
||||
else
|
||||
{
|
||||
//0x80a6a8af
|
||||
Colors[EGDC_3D_DARK_SHADOW] = 0x60767982;
|
||||
Colors[EGDC_3D_DARK_SHADOW] = 0x607679f2;
|
||||
//Colors[EGDC_3D_FACE] = 0xc0c9ccd4; // tab background
|
||||
Colors[EGDC_3D_FACE] = 0xc0cbd2d9; // tab background
|
||||
Colors[EGDC_3D_FACE] = 0xc0cbd2f9; // tab background
|
||||
Colors[EGDC_3D_SHADOW] = 0x50e4e8f1; // tab background, and left-top highlight
|
||||
Colors[EGDC_3D_HIGH_LIGHT] = 0x40c7ccdc;
|
||||
Colors[EGDC_3D_LIGHT] = 0x802e313a;
|
||||
Colors[EGDC_ACTIVE_BORDER] = 0x80404040; // window title
|
||||
Colors[EGDC_ACTIVE_BORDER] = 0x80808080; // window title
|
||||
Colors[EGDC_ACTIVE_CAPTION] = 0xffd0d0d0;
|
||||
Colors[EGDC_APP_WORKSPACE] = 0xc0646464; // unused
|
||||
Colors[EGDC_BUTTON_TEXT] = 0xd0161616;
|
||||
|
Loading…
Reference in New Issue
Block a user