16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 09:19:18 +02:00

build 180404. optional scenario clock sync with current local time, keyboard input for the ui layer

This commit is contained in:
tmj-fstate
2018-04-06 01:12:15 +02:00
parent 07f14381a8
commit 87f078925c
12 changed files with 898 additions and 796 deletions

View File

@@ -1,4 +1,4 @@
#pragma once
#include <string>
@@ -40,8 +40,15 @@ public:
// methods:
bool
init( GLFWwindow *Window );
// assign texturing hardware unit
void
set_unit( GLint const Textureunit ) { m_textureunit = Textureunit; }
// potentially processes provided input key. returns: true if the input was processed, false otherwise
bool
on_key( int const Key, int const Action );
// updates state of UI elements
void
update();
// draws requested UI elements
void
render();
@@ -85,11 +92,10 @@ private:
void
quad( glm::vec4 const &Coordinates, glm::vec4 const &Color );
// members:
GLFWwindow *m_window { nullptr };
GLint m_textureunit{ GL_TEXTURE0 };
GLuint m_fontbase { (GLuint)-1 }; // numer DL dla znaków w napisach
GLuint m_fontbase { (GLuint)-1 }; // numer DL dla znaków w napisach
// progress bar config. TODO: put these together into an object
float m_progress { 0.0f }; // percentage of filled progres bar, to indicate lengthy operations.
@@ -101,6 +107,13 @@ private:
GLuint m_texture { 0 };
std::vector<std::shared_ptr<ui_panel> > m_panels;
std::string m_tooltip;
// TODO: clean these legacy components up
std::shared_ptr<ui_panel> UIHeader; // header ui panel
std::shared_ptr<ui_panel> UITable; // schedule or scan table
std::shared_ptr<ui_panel> UITranscripts; // voice transcripts
int tprev; // poprzedni czas
double VelPrev; // poprzednia prędkość
double Acc; // przyspieszenie styczne
};
extern ui_layer UILayer;