diff options
| author | boris <wzn@moneybot.cc> | 2018-11-28 16:01:44 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2018-11-28 16:01:44 +1300 |
| commit | 1fc179609e1392285e7f3fd01289895c6e5de66c (patch) | |
| tree | 20200107fb027a63078c6cb63bc4b3f894c3228c /loader/ui_progressbar.h | |
| parent | 3d412a4b30a9f7c7f51ea6562e694315948bd3da (diff) | |
oopsie >w<
it appears i've made a fucky wucky ;w;www
Diffstat (limited to 'loader/ui_progressbar.h')
| -rw-r--r-- | loader/ui_progressbar.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/loader/ui_progressbar.h b/loader/ui_progressbar.h deleted file mode 100644 index 33bcf65..0000000 --- a/loader/ui_progressbar.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once
-#include "ui_base_item.h"
-
-namespace ui
-{
- class c_progress_bar : public base_item {
- public:
- c_progress_bar( int x, int y, int w, float* progress ) :
- base_item( x, y, w, 4, xors( "PROGRESS_BAR" ) ),
- m_progress( progress ) { }
-
-
- virtual void render( ) override {
- static const clr_t col_start = clr_t( 231, 105, 105, 255 );
- static const clr_t col_end = clr_t( 0xf4, 0x7c, 0xa8, 255 );
-
- int x = get_relative_x( );
- int y = get_relative_y( );
-
- ui_draw_rect( x, y, m_width, m_height, ui_get_disabled_col( ) );
-
- if( *m_progress > 0.001f ) {
- int fill = *m_progress * m_width;
-
- bool reverse = false;
- for( int i{ }; i < fill; ++i ) {
- float progress = std::fmod( float( i ) / fill - ( anim_time ), 1.f );
- if( progress == 1.0f ) reverse = true;
- if( reverse ) {
- progress = 1.0f - progress;
- }
-
- clr_t col = clr_t::blend( col_start, col_end, progress );
-
-
- ui_draw_rect( x + i, y, 1, m_height, col );
- }
- }
- }
-
- private:
- float* m_progress;
- };
-}
\ No newline at end of file |
