ソースを参照

UI drawing code cleanup.

Lasse Öörni 12 年 前
コミット
eb9bc8847f

+ 3 - 3
Source/Engine/UI/Text.cpp

@@ -114,7 +114,7 @@ void Text::GetBatches(PODVector<UIBatch>& batches, PODVector<float>& vertexData,
         UIBatch batch(this, BLEND_ALPHA, currentScissor, 0, &vertexData);
         batch.SetColor(both ? selectionColor_.Lerp(hoverColor_, 0.5f) : (selected_ && selectionColor_.a_ > 0.0f ? 
             selectionColor_: hoverColor_));
-        batch.AddQuad(0, 0, GetWidth(), GetHeight(), 0, 0, 0, 0);
+        batch.AddQuad(0, 0, GetWidth(), GetHeight(), 0, 0);
         UIBatch::AddOrMerge(batch, batches);
     }
 
@@ -134,7 +134,7 @@ void Text::GetBatches(PODVector<UIBatch>& batches, PODVector<float>& vertexData,
                 if (charPositions_[i].y_ != currentStart.y_)
                 {
                     batch.AddQuad(currentStart.x_, currentStart.y_, currentEnd.x_ - currentStart.x_, currentEnd.y_ - currentStart.y_,
-                        0, 0, 0, 0);
+                        0, 0);
                     currentStart = charPositions_[i];
                     currentEnd = currentStart + charSizes_[i];
                 }
@@ -148,7 +148,7 @@ void Text::GetBatches(PODVector<UIBatch>& batches, PODVector<float>& vertexData,
         if (currentEnd != currentStart)
         {
             batch.AddQuad(currentStart.x_, currentStart.y_, currentEnd.x_ - currentStart.x_, currentEnd.y_ - currentStart.y_,
-                0, 0, 0, 0);
+                0, 0);
         }
 
         UIBatch::AddOrMerge(batch, batches);

+ 4 - 4
Source/Engine/UI/UIElement.cpp

@@ -407,13 +407,13 @@ void UIElement::GetDebugDrawBatches(PODVector<UIBatch>& batches, PODVector<float
 
     batch.SetColor(DEBUG_DRAW_COLOR, true);
     // Left
-    batch.AddQuad(0, 0, horizontalThickness, size_.y_, 0, 0, 0, 0);
+    batch.AddQuad(0, 0, horizontalThickness, size_.y_, 0, 0);
     // Top
-    batch.AddQuad(0, 0, size_.x_, verticalThickness, 0, 0, 0, 0);
+    batch.AddQuad(0, 0, size_.x_, verticalThickness, 0, 0);
     // Right
-    batch.AddQuad(size_.x_ - horizontalThickness, 0, horizontalThickness, size_.y_, 0, 0, 0, 0);
+    batch.AddQuad(size_.x_ - horizontalThickness, 0, horizontalThickness, size_.y_, 0, 0);
     // Bottom
-    batch.AddQuad(0, size_.y_ - verticalThickness, size_.x_, verticalThickness, 0, 0, 0, 0);
+    batch.AddQuad(0, size_.y_ - verticalThickness, size_.x_, verticalThickness, 0, 0);
 
     UIBatch::AddOrMerge(batch, batches);
 }

+ 2 - 2
Source/Engine/UI/Window.cpp

@@ -91,7 +91,7 @@ void Window::GetBatches(PODVector<UIBatch>& batches, PODVector<float>& vertexDat
             const IntVector2& rootSize = rootElement->GetSize();
             UIBatch batch(rootElement, BLEND_ALPHA, IntRect(0, 0, rootSize.x_, rootSize.y_), 0, &vertexData);
             batch.SetColor(modalShadeColor_);
-            batch.AddQuad(0, 0, rootSize.x_, rootSize.y_, 0, 0, 0, 0);
+            batch.AddQuad(0, 0, rootSize.x_, rootSize.y_, 0, 0);
             UIBatch::AddOrMerge(batch, batches);
         }
 
@@ -103,7 +103,7 @@ void Window::GetBatches(PODVector<UIBatch>& batches, PODVector<float>& vertexDat
             IntVector2 size = GetSize();
             size.x_ -= x;
             batch.SetColor(modalFrameColor_);
-            batch.AddQuad(x - modalFrameSize_.x_, -modalFrameSize_.y_, size.x_ + 2 * modalFrameSize_.x_, size.y_ + 2 * modalFrameSize_.y_, 0, 0, 0, 0);
+            batch.AddQuad(x - modalFrameSize_.x_, -modalFrameSize_.y_, size.x_ + 2 * modalFrameSize_.x_, size.y_ + 2 * modalFrameSize_.y_, 0, 0);
             UIBatch::AddOrMerge(batch, batches);
         }
     }