Skip to content

Commit

Permalink
Rework RA Chrome in preparation for UI scaling.
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Dec 28, 2019
1 parent 032c412 commit 789b858
Show file tree
Hide file tree
Showing 21 changed files with 412 additions and 422 deletions.
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/LoadScreens/LogoStripeLoadScreen.cs
Expand Up @@ -48,7 +48,7 @@ public override void Init(ModData modData, Dictionary<string, string> info)
sheet = new Sheet(SheetType.BGRA, stream);

logo = new Sprite(sheet, new Rectangle(0, 0, 256, 256), TextureChannel.RGBA);
stripe = new Sprite(sheet, new Rectangle(256, 0, 256, 256), TextureChannel.RGBA);
stripe = new Sprite(sheet, new Rectangle(258, 0, 253, 256), TextureChannel.RGBA);
stripeRect = new Rectangle(0, r.Resolution.Height / 2 - 128, r.Resolution.Width, 256);
logoPos = new float2(r.Resolution.Width / 2 - 128, r.Resolution.Height / 2 - 128);
}
Expand Down
50 changes: 20 additions & 30 deletions mods/common/chrome/assetbrowser.yaml
Expand Up @@ -119,72 +119,62 @@ Background@ASSETBROWSER_PANEL:
Button@BUTTON_PREV:
X: 0
Y: 0
Width: 25
Height: 25
Width: 26
Height: 26
Key: LEFT
Children:
Image@IMAGE_PREV:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: prev
Button@BUTTON_PLAY:
X: 35
Y: 0
Width: 25
Height: 25
Width: 26
Height: 26
Key: SPACE
Children:
Image@IMAGE_PLAY:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Visible: false
X: 35
Y: 0
Width: 25
Height: 25
Width: 26
Height: 26
Key: SPACE
Children:
Image@IMAGE_PAUSE:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: pause
Button@BUTTON_STOP:
X: 70
Y: 0
Width: 25
Height: 25
Width: 26
Height: 26
Key: RETURN
Children:
Image@IMAGE_STOP:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: stop
Button@BUTTON_NEXT:
X: 105
Y: 0
Width: 25
Height: 25
Width: 26
Height: 26
Key: RIGHT
Children:
Image@IMAGE_NEXT:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: next
Slider@FRAME_SLIDER:
Expand Down
9 changes: 4 additions & 5 deletions mods/common/chrome/ingame-observer.yaml
Expand Up @@ -100,9 +100,8 @@ Container@OBSERVER_WIDGETS:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PAUSE:
Y: 1
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: pause
Button@BUTTON_PLAY:
Expand All @@ -116,8 +115,8 @@ Container@OBSERVER_WIDGETS:
TooltipContainer: TOOLTIP_CONTAINER
Children:
Image@IMAGE_PLAY:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: play
Button@BUTTON_SLOW:
Expand Down
20 changes: 10 additions & 10 deletions mods/common/chrome/lobby-music.yaml
Expand Up @@ -59,8 +59,8 @@ Container@LOBBY_MUSIC_BIN:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PREV:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: prev
Button@BUTTON_PLAY:
Expand All @@ -70,8 +70,8 @@ Container@LOBBY_MUSIC_BIN:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PLAY:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Expand All @@ -82,8 +82,8 @@ Container@LOBBY_MUSIC_BIN:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PAUSE:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: pause
Button@BUTTON_STOP:
Expand All @@ -93,8 +93,8 @@ Container@LOBBY_MUSIC_BIN:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_STOP:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: stop
Button@BUTTON_NEXT:
Expand All @@ -104,8 +104,8 @@ Container@LOBBY_MUSIC_BIN:
IgnoreChildMouseOver: true
Children:
Image@IMAGE_NEXT:
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: next
Checkbox@SHUFFLE:
Expand Down
50 changes: 20 additions & 30 deletions mods/common/chrome/musicplayer.yaml
Expand Up @@ -55,68 +55,58 @@ Background@MUSIC_PANEL:
Width: 170
Children:
Button@BUTTON_PREV:
Width: 25
Height: 25
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PREV:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: prev
Button@BUTTON_PLAY:
X: 35
Width: 25
Height: 25
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PLAY:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: play
Button@BUTTON_PAUSE:
Visible: false
X: 35
Width: 25
Height: 25
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_PAUSE:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: pause
Button@BUTTON_STOP:
X: 70
Width: 25
Height: 25
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_STOP:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: stop
Button@BUTTON_NEXT:
X: 105
Width: 25
Height: 25
Width: 26
Height: 26
IgnoreChildMouseOver: true
Children:
Image@IMAGE_NEXT:
X: 0
Y: 0
Width: 25
Height: 25
X: 5
Y: 5
ImageCollection: music
ImageName: next
ExponentialSlider@MUSIC_SLIDER:
Expand Down
13 changes: 6 additions & 7 deletions mods/d2k/chrome.yaml
Expand Up @@ -276,13 +276,12 @@ strategic:
music:
Inherits: ^Buttons
Regions:
pause: 0, 193, 25, 25
stop: 25, 193, 25, 25
play: 55, 193, 25, 25
next: 82, 193, 25, 25
prev: 110, 193, 25, 25
fastforward: 131, 193, 25, 25
slowmo: 159, 193, 25, 25
pause: 5, 198, 16, 16
stop: 30, 198, 16, 16
play: 59, 198, 16, 16
next: 87, 198, 16, 16
prev: 114, 198, 16, 16
fastforward: 138, 198, 16, 16

scrollbar:
Inherits: ^Buttons
Expand Down

0 comments on commit 789b858

Please sign in to comment.