Kaynağa Gözat

Repositioned example GUI elements

Marko Pintera 11 yıl önce
ebeveyn
işleme
570f09de12
3 değiştirilmiş dosya ile 10 ekleme ve 20 silme
  1. 9 12
      ExampleProject/Main/Main.cpp
  2. 0 7
      Polish.txt
  3. 1 1
      README.md

+ 9 - 12
ExampleProject/Main/Main.cpp

@@ -369,22 +369,22 @@ namespace BansheeEngine
 
 
 		// Create a GUI area that is used for displaying messages about toggling profiler overlays.
 		// Create a GUI area that is used for displaying messages about toggling profiler overlays.
 		// This area will stretch the entire surface of its parent widget, even if the widget is resized.
 		// This area will stretch the entire surface of its parent widget, even if the widget is resized.
-		GUIArea* topArea = GUIArea::createStretchedXY(*gui, 0, 0, 0, 0);
+		GUIArea* bottomArea = GUIArea::createStretchedXY(*gui, 0, 0, 0, 0);
 
 
 		// Add a vertical layout that will automatically position any child elements top to bottom.
 		// Add a vertical layout that will automatically position any child elements top to bottom.
-		GUILayout& topLayout = topArea->getLayout().addLayoutY();
+		GUILayout& bottomLayout = bottomArea->getLayout().addLayoutY();
+
+		// Add a flexible space that fills up any remaining area in the layout, making the two labels above be aligned
+		// to the bottom of the GUI widget (and the screen).
+		bottomLayout.addFlexibleSpace();
 
 
 		// Add a couple of labels to the layout with the needed messages. Labels expect a HString object that
 		// Add a couple of labels to the layout with the needed messages. Labels expect a HString object that
 		// maps into a string table and allows for easily localization. 
 		// maps into a string table and allows for easily localization. 
-		topLayout.addElement(GUILabel::create(HString(L"Press F1 to toggle CPU profiler overlay")));
-		topLayout.addElement(GUILabel::create(HString(L"Press F2 to toggle GPU profiler overlay")));
-
-		// Add a flexible space that fills up any remaining area in the layout, making the two labels above be aligned
-		// to the top of the GUI widget (and the screen).
-		topLayout.addFlexibleSpace();
+		bottomLayout.addElement(GUILabel::create(HString(L"Press F1 to toggle CPU profiler overlay")));
+		bottomLayout.addElement(GUILabel::create(HString(L"Press F2 to toggle GPU profiler overlay")));
 
 
 		// Create a GUI area that is used for displaying resolution and fullscreen options.
 		// Create a GUI area that is used for displaying resolution and fullscreen options.
-		GUIArea* rightArea = GUIArea::createStretchedXY(*gui, 0, 0, 0, 0);
+		GUIArea* rightArea = GUIArea::createStretchedXY(*gui, 30, 30, 30, 30);
 
 
 		// We want all the GUI elements be right aligned, so we add a flexible space first.
 		// We want all the GUI elements be right aligned, so we add a flexible space first.
 		rightArea->getLayout().addFlexibleSpace();
 		rightArea->getLayout().addFlexibleSpace();
@@ -392,9 +392,6 @@ namespace BansheeEngine
 		// And we want the elements to be vertically placed, top to bottom
 		// And we want the elements to be vertically placed, top to bottom
 		GUILayout& rightLayout = rightArea->getLayout().addLayoutY();
 		GUILayout& rightLayout = rightArea->getLayout().addLayoutY();
 
 
-		// Add an empty space of 50 pixels
-		rightLayout.addSpace(50);
-
 		// Add a button that will trigger a callback when clicked
 		// Add a button that will trigger a callback when clicked
 		toggleFullscreenButton = GUIButton::create(HString(L"Toggle fullscreen"));
 		toggleFullscreenButton = GUIButton::create(HString(L"Toggle fullscreen"));
 		toggleFullscreenButton->onClick.connect(&toggleFullscreen);
 		toggleFullscreenButton->onClick.connect(&toggleFullscreen);

+ 0 - 7
Polish.txt

@@ -1,8 +1,6 @@
 Polish TODO:
 Polish TODO:
  - Finalize example with resolution settings and proper GUI
  - Finalize example with resolution settings and proper GUI
-  - Ensure that going fullscreen and windowed works fine
  - Add an example model
  - Add an example model
- - Test if example shuts down fine
 
 
  - Add license text to all files
  - Add license text to all files
 
 
@@ -21,11 +19,6 @@ Polish TODO:
  - Updates links in git readme
  - Updates links in git readme
  - Update links in license text
  - Update links in license text
 
 
-TaskScheduler crashes on shutdown. My guess is because mutex and condition var go outs of scope but they're still being called on the task thread. Similar issue might exist in CoreThread.
-
-Automatically release resources on shutdown instead of forcing the user to manually call unload() and set handles to nullptr.
- - e.g. just invalidate all handles automatically
-
 --------------------
 --------------------
 
 
 Delay this until release:
 Delay this until release:

+ 1 - 1
README.md

@@ -76,7 +76,7 @@ Project is currently in active development. Current version is considered a prev
 
 
 ## Jump in
 ## Jump in
 
 
-Easiest way to get started with Banshee is to check out `ExampleProject` included with the source code. However to give you a taste here are a few code snippets.
+Easiest way to get started with Banshee is to check out the `ExampleProject` included with the source code. However to give you a taste here are a few code snippets.
 
 
 ### Starting a minimal application
 ### Starting a minimal application
 ```
 ```