Merge branch 'master' of https://github.com/Flakebi/stk-code into Flakebi-master
This commit is contained in:
commit
e3513b10c6
@ -237,8 +237,10 @@ when the border that intersect at this corner are enabled.
|
||||
<!-- Text field color -->
|
||||
<color type="text_field" state="background" a="255" r="200" g="200" b="200" />
|
||||
<color type="text_field" state="background_focused" a="255" r="223" g="238" b="248" />
|
||||
<color type="text_field" state="background_deactivated" a="255" r="200" g="200" b="200" />
|
||||
<color type="text_field" state="neutral" a="255" r="138" g="138" b="138" />
|
||||
<color type="text_field" state="focused" a="255" r="42" g="169" b="211" />
|
||||
<color type="text_field" state="deactivated" a="255" r="138" g="138" b="138" />
|
||||
|
||||
<!-- Rating star image -->
|
||||
<element type="rating" state="neutral" image="ocean/rating_star.png" />
|
||||
|
@ -235,8 +235,10 @@ when the border that intersect at this corner are enabled.
|
||||
<!-- Text field color -->
|
||||
<color type="text_field" state="background" a="255" r="200" g="200" b="200" />
|
||||
<color type="text_field" state="background_focused" a="255" r="236" g="226" b="201" />
|
||||
<color type="text_field" state="background_deactivated" a="255" r="200" g="200" b="200" />
|
||||
<color type="text_field" state="neutral" a="255" r="138" g="138" b="138" />
|
||||
<color type="text_field" state="focused" a="255" r="243" g="164" b="80" />
|
||||
<color type="text_field" state="deactivated" a="255" r="138" g="138" b="138" />
|
||||
|
||||
<!-- Rating star image -->
|
||||
<element type="rating" state="neutral" image="peach/rating_star.png" />
|
||||
|
@ -1914,6 +1914,8 @@ void IrrDriver::update(float dt)
|
||||
// =================================
|
||||
if (!m_device->run())
|
||||
{
|
||||
GUIEngine::cleanUp();
|
||||
GUIEngine::deallocate();
|
||||
main_loop->abort();
|
||||
return;
|
||||
}
|
||||
@ -2403,3 +2405,4 @@ GLuint IrrDriver::getDepthStencilTexture()
|
||||
{
|
||||
return m_rtts->getDepthStencilTexture();
|
||||
}
|
||||
|
||||
|
@ -131,12 +131,10 @@ void IrrDriver::renderGLSL(float dt)
|
||||
Camera * const camera = Camera::getCamera(cam);
|
||||
scene::ICameraSceneNode * const camnode = camera->getCameraSceneNode();
|
||||
|
||||
#ifdef ENABLE_PROFILER
|
||||
std::ostringstream oss;
|
||||
oss << "drawAll() for kart " << cam << std::flush;
|
||||
oss << "drawAll() for kart " << cam;
|
||||
PROFILER_PUSH_CPU_MARKER(oss.str().c_str(), (cam+1)*60,
|
||||
0x00, 0x00);
|
||||
#endif
|
||||
camera->activate();
|
||||
rg->preRenderCallback(camera); // adjusts start referee
|
||||
m_scene_manager->setActiveCamera(camnode);
|
||||
@ -228,10 +226,10 @@ void IrrDriver::renderGLSL(float dt)
|
||||
for(unsigned int i=0; i<Camera::getNumCameras(); i++)
|
||||
{
|
||||
Camera *camera = Camera::getCamera(i);
|
||||
char marker_name[100];
|
||||
sprintf(marker_name, "renderPlayerView() for kart %d", i);
|
||||
std::ostringstream oss;
|
||||
oss << "renderPlayerView() for kart " << i;
|
||||
|
||||
PROFILER_PUSH_CPU_MARKER(marker_name, 0x00, 0x00, (i+1)*60);
|
||||
PROFILER_PUSH_CPU_MARKER(oss.str().c_str(), 0x00, 0x00, (i+1)*60);
|
||||
rg->renderPlayerView(camera, dt);
|
||||
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
@ -407,12 +405,10 @@ void IrrDriver::renderFixed(float dt)
|
||||
{
|
||||
Camera *camera = Camera::getCamera(i);
|
||||
|
||||
#ifdef ENABLE_PROFILER
|
||||
std::ostringstream oss;
|
||||
oss << "drawAll() for kart " << i << std::flush;
|
||||
oss << "drawAll() for kart " << i;
|
||||
PROFILER_PUSH_CPU_MARKER(oss.str().c_str(), (i+1)*60,
|
||||
0x00, 0x00);
|
||||
#endif
|
||||
camera->activate();
|
||||
rg->preRenderCallback(camera); // adjusts start referee
|
||||
|
||||
@ -437,10 +433,10 @@ void IrrDriver::renderFixed(float dt)
|
||||
for(unsigned int i=0; i<Camera::getNumCameras(); i++)
|
||||
{
|
||||
Camera *camera = Camera::getCamera(i);
|
||||
char marker_name[100];
|
||||
sprintf(marker_name, "renderPlayerView() for kart %d", i);
|
||||
std::ostringstream oss;
|
||||
oss << "renderPlayerView() for kart " << i;
|
||||
|
||||
PROFILER_PUSH_CPU_MARKER(marker_name, 0x00, 0x00, (i+1)*60);
|
||||
PROFILER_PUSH_CPU_MARKER(oss.str().c_str(), 0x00, 0x00, (i+1)*60);
|
||||
rg->renderPlayerView(camera, dt);
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
|
||||
|
@ -691,7 +691,6 @@ X##_yflip.LowerRightCorner.Y = w->m_skin_dest_y + \
|
||||
void Skin::drawButton(Widget* w, const core::recti &rect,
|
||||
const bool pressed, const bool focused)
|
||||
{
|
||||
|
||||
// if within an appearing dialog, grow
|
||||
if (m_dialog && m_dialog_size < 1.0f && w->m_parent != NULL &&
|
||||
w->m_parent->getType() == gui::EGUIET_WINDOW)
|
||||
@ -2101,8 +2100,10 @@ void Skin::draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor,
|
||||
{
|
||||
SColor& bg_color = SkinConfig::m_colors["text_field::background"];
|
||||
SColor& bg_color_focused = SkinConfig::m_colors["text_field::background_focused"];
|
||||
SColor& bg_color_deactivated = SkinConfig::m_colors["text_field::background_deactivated"];
|
||||
SColor& border_color = SkinConfig::m_colors["text_field::neutral"];
|
||||
SColor& border_color_focus = SkinConfig::m_colors["text_field::focused"];
|
||||
SColor& border_color_deactivated = SkinConfig::m_colors["text_field::deactivated"];
|
||||
|
||||
core::recti borderArea = rect;
|
||||
//borderArea.UpperLeftCorner -= position2d< s32 >( 2, 2 );
|
||||
@ -2128,12 +2129,22 @@ void Skin::draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor,
|
||||
center.Y + (int)(((int)rect.LowerRightCorner.Y
|
||||
- (int)center.Y)*texture_size);
|
||||
}
|
||||
GL32_draw2DRectangle(focused ? border_color_focus : border_color, borderArea);
|
||||
if(widget->m_deactivated)
|
||||
GL32_draw2DRectangle(border_color_deactivated, borderArea);
|
||||
else if(focused)
|
||||
GL32_draw2DRectangle(border_color_focus, borderArea);
|
||||
else
|
||||
GL32_draw2DRectangle(border_color, borderArea);
|
||||
|
||||
core::recti innerArea = borderArea;
|
||||
innerArea.UpperLeftCorner += position2d< s32 >( 3, 3 );
|
||||
innerArea.LowerRightCorner -= position2d< s32 >( 3, 3 );
|
||||
GL32_draw2DRectangle(focused ? bg_color_focused : bg_color, innerArea);
|
||||
if(widget->m_deactivated)
|
||||
GL32_draw2DRectangle(bg_color_deactivated, innerArea);
|
||||
else if(focused)
|
||||
GL32_draw2DRectangle(bg_color_focused, innerArea);
|
||||
else
|
||||
GL32_draw2DRectangle(bg_color, innerArea);
|
||||
return;
|
||||
}
|
||||
else if (type == WTYPE_LIST)
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "karts/kart_properties.hpp"
|
||||
#include "karts/kart_properties_manager.hpp"
|
||||
#include "karts/rescue_animation.hpp"
|
||||
#include "physics/btKart.hpp"
|
||||
#include "physics/physics.hpp"
|
||||
#include "states_screens/dialogs/select_challenge.hpp"
|
||||
#include "states_screens/offline_kart_selection.hpp"
|
||||
@ -54,7 +55,6 @@ OverWorld::~OverWorld()
|
||||
/** Function to simplify the start process */
|
||||
void OverWorld::enterOverWorld()
|
||||
{
|
||||
|
||||
race_manager->setNumLocalPlayers(1);
|
||||
race_manager->setMajorMode (RaceManager::MAJOR_MODE_SINGLE);
|
||||
race_manager->setMinorMode (RaceManager::MINOR_MODE_OVERWORLD);
|
||||
@ -231,6 +231,7 @@ void OverWorld::onMouseClick(int x, int y)
|
||||
// be the location of the challenge bubble.
|
||||
AbstractKart* kart = getKart(0);
|
||||
kart->setXYZ(challenge->m_position);
|
||||
kart->getVehicle()->capSpeed(0);
|
||||
|
||||
unsigned int index = getRescuePositionIndex(kart);
|
||||
btTransform s = getRescueTransform(index);
|
||||
|
@ -468,10 +468,10 @@ void ThreeStrikesBattle::getKartsDisplayInfo(
|
||||
break;
|
||||
}
|
||||
|
||||
char lives[4];
|
||||
sprintf(lives, "%i", m_kart_info[i].m_lives);
|
||||
std::ostringstream oss;
|
||||
oss << m_kart_info[i].m_lives;
|
||||
|
||||
rank_info.m_text = lives;
|
||||
rank_info.m_text = oss.str().c_str();
|
||||
}
|
||||
} // getKartsDisplayInfo
|
||||
|
||||
|
@ -717,10 +717,10 @@ void RaceGUI::drawSpeedAndEnergy(const AbstractKart* kart,
|
||||
font = GUIEngine::getSmallFont();
|
||||
|
||||
static video::SColor color = video::SColor(255, 255, 255, 255);
|
||||
char str[256];
|
||||
sprintf(str, "%d", (int)(speed*10));
|
||||
std::ostringstream oss;
|
||||
oss << (int)(speed*10);
|
||||
|
||||
font->draw(core::stringw(str).c_str(), pos, color);
|
||||
font->draw(oss.str().c_str(), pos, color);
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "states_screens/register_screen.hpp"
|
||||
|
||||
#include "config/player_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "audio/sfx_manager.hpp"
|
||||
#include "guiengine/widgets/check_box_widget.hpp"
|
||||
#include "guiengine/widgets/label_widget.hpp"
|
||||
@ -78,12 +79,27 @@ void RegisterScreen::init()
|
||||
|
||||
m_info_widget = getWidget<LabelWidget>("info");
|
||||
assert(m_info_widget);
|
||||
m_info_widget->setDefaultColor();
|
||||
m_info_widget->setText("", false);
|
||||
m_options_widget = getWidget<RibbonWidget>("options");
|
||||
assert(m_options_widget);
|
||||
|
||||
m_signup_request = NULL;
|
||||
m_info_message_shown = false;
|
||||
|
||||
getWidget<CheckBoxWidget>("online")->setVisible(true);
|
||||
getWidget<LabelWidget>("label_online")->setVisible(true);
|
||||
// Check if online is allowed
|
||||
if (UserConfigParams::m_internet_status != Online::RequestManager::IPERM_NOT_ALLOWED)
|
||||
{
|
||||
getWidget<CheckBoxWidget>("online")->setState(true);
|
||||
makeEntryFieldsVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
getWidget<CheckBoxWidget>("online")->setState(false);
|
||||
makeEntryFieldsVisible(false);
|
||||
}
|
||||
} // init
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -303,6 +319,13 @@ void RegisterScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
{
|
||||
if (name == "online")
|
||||
{
|
||||
if (UserConfigParams::m_internet_status == Online::RequestManager::IPERM_NOT_ALLOWED)
|
||||
{
|
||||
m_info_widget->setErrorColor();
|
||||
m_info_widget->setText(_("Internet access is disabled, please enable it in the options"), false);
|
||||
getWidget<CheckBoxWidget>("online")->setState(false);
|
||||
}
|
||||
else
|
||||
makeEntryFieldsVisible(getWidget<CheckBoxWidget>("online")->getState());
|
||||
}
|
||||
else if (name=="options")
|
||||
|
@ -251,7 +251,7 @@ void BaseUserScreen::eventCallback(Widget* widget,
|
||||
Online::RequestManager::IPERM_NOT_ALLOWED)
|
||||
{
|
||||
m_info_widget->setText(
|
||||
"Internet access is disabled, please enable it in the options",
|
||||
_("Internet access is disabled, please enable it in the options"),
|
||||
true);
|
||||
sfx_manager->quickSound( "anvil" );
|
||||
m_online_cb->setState(false);
|
||||
|
@ -6,7 +6,7 @@ cd data/gui
|
||||
l=""
|
||||
for i in $(find . -iname "*.stkgui"); do
|
||||
s=$(basename $i)
|
||||
x=$(find ../../src/states_screens -exec grep -H $s \{} \; | wc -l)
|
||||
x=$(find ../../src/states_screens -type f -exec grep -H $s \{} \; | wc -l)
|
||||
echo -n "."
|
||||
if [ $x == "0" ]; then
|
||||
l="$l $i"
|
||||
|
@ -39,7 +39,9 @@ def main():
|
||||
if statistics:
|
||||
lines_total += len(lines)
|
||||
|
||||
modified = False
|
||||
for i in range(len(lines)):
|
||||
oldLine = lines[i]
|
||||
# replacing tabs with four spaces
|
||||
lines[i] = lines[i].replace("\t", " ")
|
||||
|
||||
@ -48,9 +50,12 @@ def main():
|
||||
if statistics:
|
||||
if lines[i].lstrip().startswith("//"):
|
||||
lines_code += 1
|
||||
if not modified and oldLine != lines[i]:
|
||||
modified = True
|
||||
src_file.close()
|
||||
|
||||
# writing back
|
||||
if modified:
|
||||
src_file = open(dirpath + "/" + filename, "w")
|
||||
src_file.write("".join(lines))
|
||||
src_file.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user