Skip to content

Commit

Permalink
Split resources over folders, fix #94
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Jan 8, 2023
1 parent d8040cc commit c6da05c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion game_resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<file>resources/sound_effects/yes_mid.ogg</file>
<file>resources/subtitle.png</file>
<file>resources/t.png</file>
<file>resources/textures/lobby_menu/classic_head.png</file>
<file>resources/textures/lobby_menu/classic_head.jpg</file>
<file>resources/textures/lobby_menu/protoss_head.jpg</file>
<file>resources/textures/lobby_menu/terran_head.jpg</file>
<file>resources/textures/lobby_menu/zerg_head.jpg</file>
Expand Down
14 changes: 14 additions & 0 deletions lobby_menu_textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ lobby_menu_textures::lobby_menu_textures()
}
}

sf::Texture& lobby_menu_textures::get_color(
const chess_color c
) noexcept
{
return m_color[c];
}

std::string lobby_menu_textures::get_color_filename(
const chess_color c
) const noexcept
Expand All @@ -69,6 +76,13 @@ std::string lobby_menu_textures::get_head_filename(
return s.str();
}

sf::Texture& lobby_menu_textures::get_ready(
const bool b
) noexcept
{
return m_ready[b];
}

std::string lobby_menu_textures::get_ready_filename(
const bool is_ready
) const noexcept
Expand Down
2 changes: 1 addition & 1 deletion options_menu_textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ options_menu_textures::options_menu_textures()
{
const std::string filename_str{get_filename(r)};
const QString filename{filename_str.c_str()};
QFile f(":/resources/textures/game_options_menu/" + filename);
QFile f(":/resources/textures/options_menu/" + filename);
f.copy(filename);
if (!m_textures[r].loadFromFile(filename.toStdString()))
{
Expand Down

0 comments on commit c6da05c

Please sign in to comment.