Commit 08dfc32f authored by Aloshi's avatar Aloshi

Added the new help images. Still need to redo HelpComponent to be better.

Added some more back buttons.
Forced text in OptionListComponent to be all capitals.
parent 61378793
......@@ -239,6 +239,7 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/Sound.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SystemData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ThemeData.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Util.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/VolumeControl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Window.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/XMLReader.cpp
......@@ -302,12 +303,23 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/scroll_gradient_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/star_filled_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/star_unfilled_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_a_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_b_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_menu_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_up_down_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_left_right_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_x_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_y_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_l_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_r_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_start_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_select_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_all_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_up_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_down_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_left_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_right_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_up_down_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/help_dpad_left_right_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/opensans_hebrew_condensed_regular_ttf.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/sq_bracket_png.cpp
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/arrow_png.cpp
......@@ -316,7 +328,7 @@ set(ES_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/data/converted/slider_knob_png.cpp
)
SOURCE_GROUP(resources FILES ResourceUtil.cpp)
#SOURCE_GROUP(resources FILES ResourceUtil.cpp)
#add open gl specific sources
#if(${GLSystem} MATCHES "Desktop OpenGL")
......
......@@ -2,7 +2,7 @@
#include "Resources.h"
const size_t res2hNrOfFiles = 22;
const size_t res2hNrOfFiles = 31;
const Res2hEntry res2hFiles[res2hNrOfFiles] = {
{":/arrow.png", arrow_png_size, arrow_png_data},
{":/button.png", button_png_size, button_png_data},
......@@ -22,10 +22,19 @@ const Res2hEntry res2hFiles[res2hNrOfFiles] = {
{":/textbox_glow.png", textbox_glow_png_size, textbox_glow_png_data},
{":/help/a.png", help_a_png_size, help_a_png_data},
{":/help/b.png", help_b_png_size, help_b_png_data},
{":/help/dpad.png", help_dpad_png_size, help_dpad_png_data},
{":/help/left_right.png", help_left_right_png_size, help_left_right_png_data},
{":/help/menu.png", help_menu_png_size, help_menu_png_data},
{":/help/up_down.png", help_up_down_png_size, help_up_down_png_data}
{":/help/dpad_all.png", help_dpad_all_png_size, help_dpad_all_png_data},
{":/help/dpad_down.png", help_dpad_down_png_size, help_dpad_down_png_data},
{":/help/dpad_left.png", help_dpad_left_png_size, help_dpad_left_png_data},
{":/help/dpad_left_right.png", help_dpad_left_right_png_size, help_dpad_left_right_png_data},
{":/help/dpad_right.png", help_dpad_right_png_size, help_dpad_right_png_data},
{":/help/dpad_up.png", help_dpad_up_png_size, help_dpad_up_png_data},
{":/help/dpad_up_down.png", help_dpad_up_down_png_size, help_dpad_up_down_png_data},
{":/help/l.png", help_l_png_size, help_l_png_data},
{":/help/r.png", help_r_png_size, help_r_png_data},
{":/help/select.png", help_select_png_size, help_select_png_data},
{":/help/start.png", help_start_png_size, help_start_png_data},
{":/help/x.png", help_x_png_size, help_x_png_data},
{":/help/y.png", help_y_png_size, help_y_png_data}
};
res2hMapType::value_type mapTemp[] = {
......@@ -47,10 +56,19 @@ res2hMapType::value_type mapTemp[] = {
std::make_pair(":/textbox_glow.png", res2hFiles[15]),
std::make_pair(":/help/a.png", res2hFiles[16]),
std::make_pair(":/help/b.png", res2hFiles[17]),
std::make_pair(":/help/dpad.png", res2hFiles[18]),
std::make_pair(":/help/left_right.png", res2hFiles[19]),
std::make_pair(":/help/menu.png", res2hFiles[20]),
std::make_pair(":/help/up_down.png", res2hFiles[21])
std::make_pair(":/help/dpad_all.png", res2hFiles[18]),
std::make_pair(":/help/dpad_down.png", res2hFiles[19]),
std::make_pair(":/help/dpad_left.png", res2hFiles[20]),
std::make_pair(":/help/dpad_left_right.png", res2hFiles[21]),
std::make_pair(":/help/dpad_right.png", res2hFiles[22]),
std::make_pair(":/help/dpad_up.png", res2hFiles[23]),
std::make_pair(":/help/dpad_up_down.png", res2hFiles[24]),
std::make_pair(":/help/l.png", res2hFiles[25]),
std::make_pair(":/help/r.png", res2hFiles[26]),
std::make_pair(":/help/select.png", res2hFiles[27]),
std::make_pair(":/help/start.png", res2hFiles[28]),
std::make_pair(":/help/x.png", res2hFiles[29]),
std::make_pair(":/help/y.png", res2hFiles[30])
};
res2hMapType res2hMap(mapTemp, mapTemp + sizeof mapTemp / sizeof mapTemp[0]);
......@@ -59,17 +59,44 @@ extern const unsigned char help_a_png_data[];
extern const size_t help_b_png_size;
extern const unsigned char help_b_png_data[];
extern const size_t help_dpad_png_size;
extern const unsigned char help_dpad_png_data[];
extern const size_t help_dpad_all_png_size;
extern const unsigned char help_dpad_all_png_data[];
extern const size_t help_left_right_png_size;
extern const unsigned char help_left_right_png_data[];
extern const size_t help_dpad_down_png_size;
extern const unsigned char help_dpad_down_png_data[];
extern const size_t help_menu_png_size;
extern const unsigned char help_menu_png_data[];
extern const size_t help_dpad_left_png_size;
extern const unsigned char help_dpad_left_png_data[];
extern const size_t help_up_down_png_size;
extern const unsigned char help_up_down_png_data[];
extern const size_t help_dpad_left_right_png_size;
extern const unsigned char help_dpad_left_right_png_data[];
extern const size_t help_dpad_right_png_size;
extern const unsigned char help_dpad_right_png_data[];
extern const size_t help_dpad_up_png_size;
extern const unsigned char help_dpad_up_png_data[];
extern const size_t help_dpad_up_down_png_size;
extern const unsigned char help_dpad_up_down_png_data[];
extern const size_t help_l_png_size;
extern const unsigned char help_l_png_data[];
extern const size_t help_r_png_size;
extern const unsigned char help_r_png_data[];
extern const size_t help_select_png_size;
extern const unsigned char help_select_png_data[];
extern const size_t help_start_png_size;
extern const unsigned char help_start_png_data[];
extern const size_t help_x_png_size;
extern const unsigned char help_x_png_data[];
extern const size_t help_y_png_size;
extern const unsigned char help_y_png_data[];
struct Res2hEntry {
const std::string relativeFileName;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
data/resources/help/a.png

3.55 KB | W: | H:

data/resources/help/a.png

1.5 KB | W: | H:

data/resources/help/a.png
data/resources/help/a.png
data/resources/help/a.png
data/resources/help/a.png
  • 2-up
  • Swipe
  • Onion skin
data/resources/help/b.png

3.62 KB | W: | H:

data/resources/help/b.png

1.49 KB | W: | H:

data/resources/help/b.png
data/resources/help/b.png
data/resources/help/b.png
data/resources/help/b.png
  • 2-up
  • Swipe
  • Onion skin
data/resources/star_filled.png

3.61 KB | W: | H:

data/resources/star_filled.png

1.69 KB | W: | H:

data/resources/star_filled.png
data/resources/star_filled.png
data/resources/star_filled.png
data/resources/star_filled.png
  • 2-up
  • Swipe
  • Onion skin
data/resources/star_unfilled.png

3.62 KB | W: | H:

data/resources/star_unfilled.png

1.22 KB | W: | H:

data/resources/star_unfilled.png
data/resources/star_unfilled.png
data/resources/star_unfilled.png
data/resources/star_unfilled.png
  • 2-up
  • Swipe
  • Onion skin
#include "Util.h"
std::string strToUpper(const char* from)
{
std::string str(from);
for(unsigned int i = 0; i < str.size(); i++)
str[i] = toupper(from[i]);
return str;
}
std::string& strToUpper(std::string& str)
{
for(unsigned int i = 0; i < str.size(); i++)
str[i] = toupper(str[i]);
return str;
}
std::string strToUpper(const std::string& str)
{
return strToUpper(str.c_str());
}
\ No newline at end of file
#include <string>
inline std::string strToUpper(const char* from)
{
std::string str(from);
for(unsigned int i = 0; i < str.size(); i++)
str[i] = toupper(from[i]);
return str;
}
inline std::string& strToUpper(std::string& str)
{
for(unsigned int i = 0; i < str.size(); i++)
str[i] = toupper(str[i]);
return str;
}
inline std::string strToUpper(const std::string& str)
{
return strToUpper(str.c_str());
}
\ No newline at end of file
std::string strToUpper(const char* from);
std::string& strToUpper(std::string& str);
std::string strToUpper(const std::string& str);
\ No newline at end of file
......@@ -19,6 +19,9 @@ public:
void setText(const std::string& text, const std::string& helpText);
inline const std::string& getText() const { return mText; };
inline const std::function<void()>& getPressedFunc() const { return mPressedFunc; };
void onSizeChanged() override;
void onFocusGained() override;
void onFocusLost() override;
......
......@@ -7,12 +7,13 @@
#include <boost/assign.hpp>
static const std::map<std::string, const char*> ICON_PATH_MAP = boost::assign::map_list_of
("up/down", ":/help/up_down.png")
("left/right", ":/help/left_right.png")
("up/down/left/right", ":/help/dpad.png")
("up/down", ":/help/dpad_up_down.png")
("left/right", ":/help/dpad_left_right.png")
("up/down/left/right", ":/help/dpad_all.png")
("a", ":/help/a.png")
("b", ":/help/b.png")
("menu", ":/help/menu.png");
("menu", ":/help/start.png")
("select", ":/help/select.png");
HelpComponent::HelpComponent(Window* window) : GuiComponent(window)
{
......
......@@ -33,7 +33,7 @@ void MenuComponent::updateSize()
if(height > Renderer::getScreenHeight() * 0.7f)
height = Renderer::getScreenHeight() * 0.7f;
setSize(Renderer::getScreenWidth() * 0.4f, height);
setSize(Renderer::getScreenWidth() * 0.5f, height);
}
void MenuComponent::onSizeChanged()
......
This diff is collapsed.
This diff is collapsed.
......@@ -15,6 +15,7 @@ public:
const std::string& name2 = "", const std::function<void()>& func2 = nullptr,
const std::string& name3 = "", const std::function<void()>& func3 = nullptr);
bool input(InputConfig* config, Input input);
void onSizeChanged() override;
private:
......@@ -27,5 +28,5 @@ private:
std::shared_ptr<TextComponent> mMsg;
std::vector< std::shared_ptr<ButtonComponent> > mButtons;
std::shared_ptr<ComponentGrid> mButtonGrid;
std::function<void()> mAcceleratorFunc;
};
......@@ -30,6 +30,7 @@ GuiScraperStart::GuiScraperStart(Window* window) : GuiComponent(window),
mMenu.addWithLabel("User decides on conflicts", mApproveResults);
mMenu.addButton("START", "start scraping", std::bind(&GuiScraperStart::pressedStart, this));
mMenu.addButton("BACK", "cancel", [&] { delete this; });
mMenu.setPosition((Renderer::getScreenWidth() - mMenu.getSize().x()) / 2, Renderer::getScreenHeight() * 0.15f);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment