diff options
author | mogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-05-26 23:01:19 +0000 |
---|---|---|
committer | mogguh <mogguh@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-05-26 23:01:19 +0000 |
commit | 69d651dd5933520713ac0ecb4875f0e6702ba002 (patch) | |
tree | 5c0dc67caa574ea27d482aba5ed1de22495d35e4 /src/menu/UMenu.pas | |
parent | 0067683559bcdbc1f1937ad445cd297d23bac69b (diff) | |
download | usdx-69d651dd5933520713ac0ecb4875f0e6702ba002.tar.gz usdx-69d651dd5933520713ac0ecb4875f0e6702ba002.tar.xz usdx-69d651dd5933520713ac0ecb4875f0e6702ba002.zip |
Statics defined in theme don't necessarily need a width or height set, if omitted the the values from the texture itself will be used
SelectSlides may now have arrows and only one item set, default is off - view UScreenOptionsGame.pas as example on how to set this
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1783 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | src/menu/UMenu.pas | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/menu/UMenu.pas b/src/menu/UMenu.pas index f86746ed..ceb4ac77 100644 --- a/src/menu/UMenu.pas +++ b/src/menu/UMenu.pas @@ -652,12 +652,22 @@ begin begin Static[StatNum] := TStatic.Create(Texture.GetTexture(Name, Typ, Color)); // new skin end; - + // configures static Static[StatNum].Texture.X := X; Static[StatNum].Texture.Y := Y; - Static[StatNum].Texture.W := W; - Static[StatNum].Texture.H := H; + + //Set height and width via sprite size if omitted + if(H = 0) then + Static[StatNum].Texture.H := Static[StatNum].Texture.H + else + Static[StatNum].Texture.H := H; + + if(W = 0) then + Static[StatNum].Texture.W := Static[StatNum].Texture.W + else + Static[StatNum].Texture.W := W; + Static[StatNum].Texture.Z := Z; if (Typ <> TEXTURE_TYPE_COLORIZED) then begin @@ -1212,6 +1222,9 @@ begin SelectsS[High(SelectsS)].Texture.Z := ThemeSelectS.Z; SelectsS[High(SelectsS)].TextureSBG.Z := ThemeSelectS.Z; + SelectsS[High(SelectsS)].showArrows := ThemeSelectS.showArrows; + SelectsS[High(SelectsS)].oneItemOnly := ThemeSelectS.oneItemOnly; + //Generate Lines SelectsS[High(SelectsS)].GenLines; @@ -1255,9 +1268,20 @@ begin else SelectsS[S].TextureSBG := Texture.GetTexture(SBGName, SBGTyp); + SelectsS[High(SelectsS)].Tex_SelectS_ArrowL := Tex_SelectS_ArrowL; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowL.X := X + W + SkipX; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowL.Y := Y; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowL.W := Tex_SelectS_ArrowL.W; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowL.H := Tex_SelectS_ArrowL.H; + + SelectsS[High(SelectsS)].Tex_SelectS_ArrowR := Tex_SelectS_ArrowR; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowR.X := X + W + SkipX + SBGW - Tex_SelectS_ArrowR.W; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowR.Y := Y; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowR.W := Tex_SelectS_ArrowR.W; + SelectsS[High(SelectsS)].Tex_SelectS_ArrowR.H := Tex_SelectS_ArrowR.H; + SelectsS[S].TextureSBG.X := X + W + SkipX; SelectsS[S].TextureSBG.Y := Y; - //SelectsS[S].TextureSBG.W := 450; SelectsS[S].SBGW := SBGW; SelectsS[S].TextureSBG.H := H; SelectsS[S].SBGColR := SBGColR; |