diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_stats/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/editors/space_stats/space_stats.c | 27 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 |
3 files changed, 28 insertions, 3 deletions
diff --git a/source/blender/editors/space_stats/CMakeLists.txt b/source/blender/editors/space_stats/CMakeLists.txt index d11156ec745..ff23513dfa8 100644 --- a/source/blender/editors/space_stats/CMakeLists.txt +++ b/source/blender/editors/space_stats/CMakeLists.txt @@ -22,10 +22,12 @@ set(INC ../include ../../blenkernel ../../blenlib + ../../gpu ../../makesdna ../../makesrna ../../windowmanager ../../../../intern/guardedalloc + ../../../../intern/glew-mx ) set(INC_SYS diff --git a/source/blender/editors/space_stats/space_stats.c b/source/blender/editors/space_stats/space_stats.c index 3ebd3212d02..86659661357 100644 --- a/source/blender/editors/space_stats/space_stats.c +++ b/source/blender/editors/space_stats/space_stats.c @@ -26,6 +26,8 @@ #include "MEM_guardedalloc.h" +#include "BIF_gl.h" + #include "BKE_context.h" #include "BKE_screen.h" @@ -38,6 +40,10 @@ #include "ED_screen.h" #include "ED_space_api.h" +#include "UI_interface.h" +#include "UI_resources.h" +#include "UI_view2d.h" + #include "WM_types.h" @@ -85,9 +91,26 @@ static void stats_main_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) ar->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE; } -static void stats_main_region_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar)) +static void stats_main_region_draw(const bContext *C, ARegion *ar) { - printf("Look Sergey, it's an Editor!\n"); + View2D *v2d = &ar->v2d; + float size_x = ar->winx; + float size_y = 0.0f; + + UI_ThemeClearColor(TH_BACK); + glClear(GL_COLOR_BUFFER_BIT); + + /* update size of tot-rect (extents of data/viewable area) */ + UI_view2d_totRect_set(v2d, size_x, size_y); + + /* reset view matrix */ + UI_view2d_view_restore(C); + + /* scrollers */ + View2DScrollers *scrollers; + scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); + UI_view2d_scrollers_draw(C, v2d, scrollers); + UI_view2d_scrollers_free(scrollers); } /* add handlers, stuff you only do once or on area/region changes */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d8c36cbcf24..00280749c9f 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -79,7 +79,7 @@ EnumPropertyItem rna_enum_space_type_items[] = { {0, "", ICON_NONE, NULL, NULL}, {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related data-blocks"}, {SPACE_OUTLINER, "OUTLINER", ICON_OOPS, "Outliner", "Overview of scene graph and all available data-blocks"}, - {SPACE_STATS, "STATS", ICON_OOPS, "Statistics", "Display various statistics and logs"}, + {SPACE_STATS, "STATS", ICON_SCRIPT, "Statistics", "Display various statistics and logs"}, {SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "Edit persistent configuration settings"}, {SPACE_INFO, "INFO", ICON_INFO, "Info", "Main menu bar and list of error messages (drag down to expand and display)"}, {0, "", ICON_NONE, NULL, NULL}, |