Fix unused variable warnings

master
stujones11 2018-09-05 19:04:31 +01:00
parent d5073f3dbf
commit b729326267
2 changed files with 30 additions and 35 deletions

View File

@ -72,8 +72,8 @@ ColorCtrl::ColorCtrl(IGUIEnvironment *env, IGUIElement *parent, s32 id,
IGUIElement(EGUIET_ELEMENT, env, parent, id, rectangle)
{
IVideoDriver *driver = env->getVideoDriver();
IGUIStaticText *text = env->addStaticText(label, rect<s32>(0,0,160,20),
false, false, this);
env->addStaticText(label, rect<s32>(0,0,160,20), false, false, this);
IGUIEditBox *edit = env->addEditBox(L"", rect<s32>(180,0,250,20), true,
this, E_DIALOG_ID_COLOR_EDIT);
edit->setMax(6);
@ -167,7 +167,7 @@ AboutDialog::AboutDialog(IGUIEnvironment *env, IGUIElement *parent,
rect<s32>(32,200,268,216), D_ABOUT_LINK_TEXT, D_ABOUT_LINK_URL);
link->drop();
IGUIButton *button = env->addButton(rect<s32>(110,235,190,265), this,
env->addButton(rect<s32>(110,235,190,265), this,
E_DIALOG_ID_ABOUT_OK, L"OK");
}
@ -182,11 +182,8 @@ SettingsDialog::SettingsDialog(IGUIEnvironment *env, IGUIElement *parent,
IGUITab *tab_general = tabs->addTab(L"General");
IGUITab *tab_debug = tabs->addTab(L"Debug");
IGUIStaticText *text;
IGUIEditBox *edit;
IGUISpinBox *spin;
IGUICheckBox *check;
IGUIButton *button;
ColorCtrl *color;
color = new ColorCtrl(env, tab_general, E_DIALOG_ID_BG_COLOR,
@ -199,20 +196,20 @@ SettingsDialog::SettingsDialog(IGUIEnvironment *env, IGUIElement *parent,
color->setColor(conf->get("grid_color"));
color->drop();
text = env->addStaticText(L"Wield Attachment Bone:", rect<s32>(20,80,180,100),
env->addStaticText(L"Wield Attachment Bone:", rect<s32>(20,80,180,100),
false, false, tab_general, -1);
stringw bone_name = conf->getCStr("wield_bone");
edit = env->addEditBox(bone_name.c_str(), rect<s32>(200,80,320,100),
env->addEditBox(bone_name.c_str(), rect<s32>(200,80,320,100),
true, tab_general, E_DIALOG_ID_WIELD_BONE);
text = env->addStaticText(L"Default Screen Width:",
env->addStaticText(L"Default Screen Width:",
rect<s32>(20,110,180,130), false, false, tab_general, -1);
spin = env->addSpinBox(L"", rect<s32>(200,110,270,130),
true, tab_general, E_DIALOG_ID_SCREEN_WIDTH);
spin->setValue(conf->getInt("screen_width"));
spin->setDecimalPlaces(0);
text = env->addStaticText(L"Default Screen Height:",
env->addStaticText(L"Default Screen Height:",
rect<s32>(20,140,180,160), false, false, tab_general, -1);
spin = env->addSpinBox(L"", rect<s32>(200,140,270,160),
true, tab_general, E_DIALOG_ID_SCREEN_HEIGHT);
@ -238,9 +235,9 @@ SettingsDialog::SettingsDialog(IGUIEnvironment *env, IGUIElement *parent,
E_DIALOG_ID_DEBUG_BUFFERS, L"Show all mesh buffers");
check->setChecked(conf->getInt("debug_flags") & EDS_BBOX_BUFFERS);
button = env->addButton(rect<s32>(315,255,395,285), this,
env->addButton(rect<s32>(315,255,395,285), this,
E_DIALOG_ID_SETTINGS_OK, L"OK");
button = env->addButton(rect<s32>(230,255,310,285), this,
env->addButton(rect<s32>(230,255,310,285), this,
E_DIALOG_ID_SETTINGS_CANCEL, L"Cancel");
}
@ -523,4 +520,4 @@ bool TexturesDialog::OnEvent(const SEvent &event)
}
}
return IGUIElement::OnEvent(event);
}
}

View File

@ -12,8 +12,8 @@ VertexCtrl::VertexCtrl(IGUIEnvironment *env, IGUIElement *parent, s32 id,
IGUIElement(EGUIET_ELEMENT, env, parent, id, rectangle),
vertex(0)
{
IGUIStaticText *text = env->addStaticText(label,
rect<s32>(0,0,20,20), false, false, this);
env->addStaticText(label, rect<s32>(0,0,20,20),
false, false, this);
IGUISpinBox *spin = env->addSpinBox(L"", rect<s32>(20,0,120,20),
true, this, E_GUI_ID_VERTEX);
@ -56,8 +56,8 @@ VectorCtrl::VectorCtrl(IGUIEnvironment *env, IGUIElement *parent, s32 id,
IGUIElement(EGUIET_ELEMENT, env, parent, id, rectangle),
vector(vector3df(0,0,0))
{
IGUIStaticText *text = env->addStaticText(label,
rect<s32>(10,0,150,20), false, false, this);
env->addStaticText(label, rect<s32>(10,0,150,20),
false, false, this);
VertexCtrl *x = new VertexCtrl(env, this, E_GUI_ID_VECTOR_X,
rect<s32>(10,30,150,50), step, L"X");
@ -215,12 +215,11 @@ ToolBox::ToolBox(IGUIEnvironment *env, IGUIElement *parent, s32 id,
VectorCtrl *rotation = new VectorCtrl(env, this, E_GUI_ID_ROTATION,
rect<s32>(10,130,150,250), 15.0, L"Rotation:");
IGUIStaticText *text;
text = env->addStaticText(L"Scale:",
rect<s32>(20,260,150,280), false, false, this);
env->addStaticText(L"Scale:", rect<s32>(20,260,150,280),
false, false, this);
text = env->addStaticText(L"%",
rect<s32>(20,290,40,310), false, false, this);
env->addStaticText(L"%", rect<s32>(20,290,40,310),
false, false, this);
IGUISpinBox *scale = env->addSpinBox(L"", rect<s32>(40,290,140,310),
true, this, E_GUI_ID_SCALE);
@ -235,8 +234,8 @@ ToolBox::ToolBox(IGUIEnvironment *env, IGUIElement *parent, s32 id,
rotation->drop();
scale->setValue(node->getScale().Y * 100);
text = env->addStaticText(L"Transparency:",
rect<s32>(20,330,150,350), false, false, this);
env->addStaticText(L"Transparency:", rect<s32>(20,330,150,350),
false, false, this);
IGUIComboBox *combo = env->addComboBox(rect<s32>(20,360,140,380),
this, E_GUI_ID_MATERIAL);
@ -416,36 +415,35 @@ void GUI::initToolBar()
{
IVideoDriver *driver = device->getVideoDriver();
IGUIEnvironment *env = device->getGUIEnvironment();
IGUIStaticText *text;
IGUISpinBox *spin;
IGUIToolBar *toolbar = env->addToolBar(0, E_GUI_ID_TOOLBAR);
text = env->addStaticText(L"Animation:",
rect<s32>(20,6,120,25), false, false, toolbar);
env->addStaticText(L"Animation:", rect<s32>(20,6,120,25),
false, false, toolbar);
text = env->addStaticText(L"Start",
rect<s32>(130,6,160,25), false, false, toolbar);
env->addStaticText(L"Start", rect<s32>(130,6,160,25),
false, false, toolbar);
spin = env->addSpinBox(L"", rect<s32>(170,5,230,25),
true, toolbar, E_GUI_ID_ANIM_START);
spin->setDecimalPlaces(0);
spin->setRange(0, 10000);
text = env->addStaticText(L"End",
rect<s32>(255,6,280,25), false, false, toolbar);
env->addStaticText(L"End", rect<s32>(255,6,280,25),
false, false, toolbar);
spin = env->addSpinBox(L"", rect<s32>(290,5,350,25),
true, toolbar, E_GUI_ID_ANIM_END);
spin->setDecimalPlaces(0);
spin->setRange(0, 10000);
text = env->addStaticText(L"Speed",
rect<s32>(370,6,410,25), false, false, toolbar);
env->addStaticText(L"Speed", rect<s32>(370,6,410,25),
false, false, toolbar);
spin = env->addSpinBox(L"", rect<s32>(420,5,480,25),
true, toolbar, E_GUI_ID_ANIM_SPEED);
spin->setDecimalPlaces(0);
spin->setRange(0, 10000);
text = env->addStaticText(L"Frame",
rect<s32>(495,6,535,25), false, false, toolbar);
env->addStaticText(L"Frame", rect<s32>(495,6,535,25),
false, false, toolbar);
spin = env->addSpinBox(L"", rect<s32>(550,5,610,25),
true, toolbar, E_GUI_ID_ANIM_FRAME);
spin->setDecimalPlaces(0);