Have a sort of left gui going but not sure if I like it as a real texture yet. Will need to play with it more.
This commit is contained in:
parent
d38e2cb0f2
commit
9fe7cac79b
5 changed files with 12 additions and 8 deletions
|
@ -15,7 +15,8 @@
|
||||||
"well_down": "assets/well_down-256.png",
|
"well_down": "assets/well_down-256.png",
|
||||||
"rope_vines_up": "assets/rope_vines_up-256.png",
|
"rope_vines_up": "assets/rope_vines_up-256.png",
|
||||||
"tripwire_trap": "assets/tripwire_trap-256.png",
|
"tripwire_trap": "assets/tripwire_trap-256.png",
|
||||||
"cinqueda": "assets/cinqueda_1-256.png"
|
"cinqueda": "assets/cinqueda_1-256.png",
|
||||||
|
"left_gui": "assets/left_gui.png"
|
||||||
},
|
},
|
||||||
"enemy": {
|
"enemy": {
|
||||||
"HEARING_DISTANCE": 20
|
"HEARING_DISTANCE": 20
|
||||||
|
|
BIN
assets/left_gui.png
Normal file
BIN
assets/left_gui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
|
@ -7,9 +7,9 @@ constexpr const int TEXTURE_HEIGHT=256;
|
||||||
constexpr const int RAY_VIEW_WIDTH=900;
|
constexpr const int RAY_VIEW_WIDTH=900;
|
||||||
constexpr const int RAY_VIEW_HEIGHT=600;
|
constexpr const int RAY_VIEW_HEIGHT=600;
|
||||||
constexpr const int SCREEN_WIDTH=1280;
|
constexpr const int SCREEN_WIDTH=1280;
|
||||||
|
constexpr const int SCREEN_HEIGHT=720;
|
||||||
constexpr const int RAY_VIEW_X=(SCREEN_WIDTH - RAY_VIEW_WIDTH);
|
constexpr const int RAY_VIEW_X=(SCREEN_WIDTH - RAY_VIEW_WIDTH);
|
||||||
constexpr const int RAY_VIEW_Y=0;
|
constexpr const int RAY_VIEW_Y=0;
|
||||||
constexpr const int SCREEN_HEIGHT=720;
|
|
||||||
constexpr const bool VSYNC=false;
|
constexpr const bool VSYNC=false;
|
||||||
constexpr const int FRAME_LIMIT=60;
|
constexpr const int FRAME_LIMIT=60;
|
||||||
constexpr const int NUM_SPRITES=1;
|
constexpr const int NUM_SPRITES=1;
|
||||||
|
@ -32,8 +32,6 @@ constexpr int WALL_LIGHT_LEVEL = 3;
|
||||||
constexpr int WORLDBUILD_DIVISION = 4;
|
constexpr int WORLDBUILD_DIVISION = 4;
|
||||||
constexpr int WORLDBUILD_SHRINK = 2;
|
constexpr int WORLDBUILD_SHRINK = 2;
|
||||||
constexpr int WORLDBUILD_MAX_PATH = 200;
|
constexpr int WORLDBUILD_MAX_PATH = 200;
|
||||||
constexpr int VIDEO_WINDOW_X=1600;
|
|
||||||
constexpr int VIDEO_WINDOW_Y=900;
|
|
||||||
constexpr int UI_FONT_SIZE=30;
|
constexpr int UI_FONT_SIZE=30;
|
||||||
constexpr int BASE_MAP_FONT_SIZE=90;
|
constexpr int BASE_MAP_FONT_SIZE=90;
|
||||||
constexpr int GAME_MAP_PIXEL_POS = 600;
|
constexpr int GAME_MAP_PIXEL_POS = 600;
|
||||||
|
|
9
gui.cpp
9
gui.cpp
|
@ -222,9 +222,14 @@ namespace gui {
|
||||||
void FSM::draw_gui() {
|
void FSM::draw_gui() {
|
||||||
sf::RectangleShape rect({SCREEN_WIDTH - RAY_VIEW_WIDTH, SCREEN_HEIGHT});
|
sf::RectangleShape rect({SCREEN_WIDTH - RAY_VIEW_WIDTH, SCREEN_HEIGHT});
|
||||||
rect.setPosition({0,0});
|
rect.setPosition({0,0});
|
||||||
rect.setFillColor({50, 50, 50});
|
rect.setFillColor({36, 33, 26});
|
||||||
$window.draw(rect);
|
$window.draw(rect);
|
||||||
|
|
||||||
|
auto left_gui = $textures.sprite_textures.at("left_gui").sprite;
|
||||||
|
left_gui->setPosition({0,0});
|
||||||
|
left_gui->setColor({150, 150, 150});
|
||||||
|
$window.draw(*left_gui);
|
||||||
|
|
||||||
sf::RectangleShape lower({RAY_VIEW_WIDTH, SCREEN_HEIGHT - RAY_VIEW_HEIGHT});
|
sf::RectangleShape lower({RAY_VIEW_WIDTH, SCREEN_HEIGHT - RAY_VIEW_HEIGHT});
|
||||||
lower.setPosition({RAY_VIEW_X,RAY_VIEW_HEIGHT});
|
lower.setPosition({RAY_VIEW_X,RAY_VIEW_HEIGHT});
|
||||||
lower.setFillColor({40, 40, 40});
|
lower.setFillColor({40, 40, 40});
|
||||||
|
@ -251,7 +256,7 @@ namespace gui {
|
||||||
FRAME_LIMIT, DEBUG_BUILD, $rayview.$dir_x,
|
FRAME_LIMIT, DEBUG_BUILD, $rayview.$dir_x,
|
||||||
$rayview.$dir_y, $rayview.$pos_x, $rayview.$pos_y));
|
$rayview.$dir_y, $rayview.$pos_x, $rayview.$pos_y));
|
||||||
|
|
||||||
$window.draw($text);
|
// $window.draw($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FSM::render() {
|
void FSM::render() {
|
||||||
|
|
|
@ -19,8 +19,8 @@ using ftxui::Canvas, ftxui::Screen;
|
||||||
* BUG: This could be so much better.
|
* BUG: This could be so much better.
|
||||||
*/
|
*/
|
||||||
struct RenderConfig {
|
struct RenderConfig {
|
||||||
unsigned int video_x = VIDEO_WINDOW_X;
|
unsigned int video_x = SCREEN_WIDTH;
|
||||||
unsigned int video_y = VIDEO_WINDOW_Y;
|
unsigned int video_y = SCREEN_HEIGHT;
|
||||||
int ui_font_size=UI_FONT_SIZE;
|
int ui_font_size=UI_FONT_SIZE;
|
||||||
int base_map_font_size=BASE_MAP_FONT_SIZE;
|
int base_map_font_size=BASE_MAP_FONT_SIZE;
|
||||||
wchar_t bg_tile = BG_TILE;
|
wchar_t bg_tile = BG_TILE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue