mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-16 02:59:49 +01:00
UI: Track translate/scale/fade transform by screen.
This translates drawing, scissor, and touch to the transform.
This commit is contained in:
1 parent
92b0f00cd8
commit
a36ecb7065
11 files changed
+136
-29
No files matched your search
@@ -130,12 +130,11 @@ void ViewGroup::Draw(UIContext &dc) {
|
||||
}
|
||||
|
||||
dc.FillRect(bg_, bounds_);
|
||||
for (auto iter = views_.begin(); iter != views_.end(); ++iter) {
|
||||
// TODO: If there is a transformation active, transform input coordinates accordingly.
|
||||
if ((*iter)->GetVisibility() == V_VISIBLE) {
|
||||
for (View *view : views_) {
|
||||
if (view->GetVisibility() == V_VISIBLE) {
|
||||
// Check if bounds are in current scissor rectangle.
|
||||
if (dc.GetScissorBounds().Intersects((*iter)->GetBounds()))
|
||||
(*iter)->Draw(dc);
|
||||
if (dc.GetScissorBounds().Intersects(dc.TransformBounds(view->GetBounds())))
|
||||
view->Draw(dc);
|
||||
}
|
||||
}
|
||||
if (clip_) {
|
||||
@@ -144,10 +143,9 @@ void ViewGroup::Draw(UIContext &dc) {
|
||||
}
|
||||
|
||||
void ViewGroup::Update() {
|
||||
for (auto iter = views_.begin(); iter != views_.end(); ++iter) {
|
||||
// TODO: If there is a transformation active, transform input coordinates accordingly.
|
||||
if ((*iter)->GetVisibility() != V_GONE)
|
||||
(*iter)->Update();
|
||||
for (View *view : views_) {
|
||||
if (view->GetVisibility() != V_GONE)
|
||||
view->Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user