forked from Mirrors/openclonk
#394 - Separate graphic for "Mouse Over" for main-menu buttons and Icons
parent
3efedf1d5c
commit
4a517e06b6
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -96,9 +96,6 @@
|
|||
#define C4CFN_ClrByOwnerExPNG "Overlay*.png"
|
||||
#define C4CFN_DefDesc "Desc%s.txt"
|
||||
#define C4CFN_BigIcon "BigIcon.png"
|
||||
#define C4CFN_Portrait "Portrait.png"
|
||||
#define C4CFN_PortraitOverlay "PortraitOverlay.png"
|
||||
#define C4CFN_Portraits "Portrait*.*"
|
||||
#define C4CFN_UpperBoard "UpperBoard"
|
||||
#define C4CFN_Logo "Logo"
|
||||
#define C4CFN_MoreMusic "MoreMusic.txt"
|
||||
|
@ -175,14 +172,14 @@
|
|||
#define C4FLS_Section "Scenario.txt|Game.txt|Landscape.bmp|Landscape.png|Sky.bmp|Sky.png|Sky.jpeg|Sky.jpg|PXS.ocb|MassMover.ocb|CtrlRec.ocb|Strings.txt|Objects.txt"
|
||||
#define C4FLS_SectionLandscape "Scenario.txt|Landscape.bmp|Landscape.png|PXS.ocb|MassMover.ocb"
|
||||
#define C4FLS_SectionObjects "Strings.txt|Objects.txt"
|
||||
#define C4FLS_Def "Particle.txt|DefCore.txt|Graphics.png|Overlay.png|Graphics*.png|Overlay*.png|Portrait*.png|StringTbl*.txt|Script.c|Script*.c|C4Script.c|Names*.txt|Title*.txt|ClonkNames.txt|Rank.txt|Rank.png|Desc*.txt|Overlay.png|Title.png|Icon.bmp|Author.txt|Version.txt|*.wav|*.ocd"
|
||||
#define C4FLS_Player "Player.txt|Portrait.png|Portrait.bmp|*.oci"
|
||||
#define C4FLS_Object "ObjectInfo.txt|Portrait.png|Portrait.bmp"
|
||||
#define C4FLS_Def "Particle.txt|DefCore.txt|Graphics.png|Overlay.png|Graphics*.png|Overlay*.png|StringTbl*.txt|Script.c|Script*.c|C4Script.c|Names*.txt|Title*.txt|ClonkNames.txt|Rank.txt|Rank.png|Desc*.txt|Overlay.png|Title.png|Icon.bmp|Author.txt|Version.txt|*.wav|*.ocd"
|
||||
#define C4FLS_Player "Player.txt|*.oci"
|
||||
#define C4FLS_Object "ObjectInfo.txt"
|
||||
#define C4FLS_Folder "Folder.txt|Title*.txt|Info.txt|Desc*.rtf|Title.png|Title.bmp|Icon.png|Icon.bmp|Author.txt|Version.txt|*.ocs|Loader*.bmp|Loader*.png|Loader*.jpeg|Loader*.jpg|FolderMap.txt|FolderMap.png"
|
||||
#define C4FLS_Material "TexMap.txt|*.bmp|*.png|*.ocm"
|
||||
#define C4FLS_Graphics "Loader*.bmp|Loader*.png|Loader*.jpeg|Loader*.jpg|FontEndeavour12.png|FontEndeavour24.png|FontEndeavour16.png|FontEndeavour10.png|Font*.png"\
|
||||
"|*.pal|Control.png|Fire.png|Background.png|Flag.png|Crew.png|Wealth.png|Player.png|Rank.png|Entry.png|Captain.png|Cursor.png|CursorSmall.png|CursorMedium.png|CursorLarge.png|SelectMark.png|MenuSymbol.png|Menu.png|Logo.png|Construction.png|Energy.png|Options.png|UpperBoard.png|Arrow.png|Exit.png|Hand.png|Gamepad.png|Build.png|Liquid.png"\
|
||||
"|GUICaption.png|GUIButton.png|GUIButtonDown.png|GUIButtonHighlight.png|GUIIcons.png|GUIIcons2.png|GUIScroll.png|GUIContext.png|GUISubmenu.png|GUICheckBox.png|GUIBigArrows.png|GUIProgress.png"\
|
||||
#define C4FLS_Graphics "Loader*.bmp|Loader*.png|Loader*.jpeg|Loader*.jpg|Font*.png"\
|
||||
"|*.pal|Control.png|Fire.png|Background.png|Flag.png|Crew.png|Wealth.png|Player.png|Rank.png|Captain.png|Cursor.png|CursorSmall.png|CursorMedium.png|CursorLarge.png|SelectMark.png|MenuSymbol.png|Menu.png|Logo.png|Construction.png|Energy.png|Options.png|UpperBoard.png|Arrow.png|Exit.png|Hand.png|Gamepad.png|Build.png|Liquid.png"\
|
||||
"|GUICaption.png|GUIButton.png|GUIButtonDown.png|GUIButtonHighlight.png|GUIButtonHighlightRound.png|GUIIcons.png|GUIIcons2.png|GUIScroll.png|GUIContext.png|GUISubmenu.png|GUICheckBox.png|GUIBigArrows.png|GUIProgress.png"\
|
||||
"|StartupScenSelBG.*|StartupPlrSelBG.*|StartupPlrPropBG.*|StartupNetworkBG.*|StartupAboutBG.*|StartupBigButton.png|StartupBigButtonDown.png|StartupBookScroll.png|StartupContext.png|StartupScenSelIcons.png|StartupScenSelTitleOv.png|StartupDlgPaper.png|StartupOptionIcons.png|StartupTabClip.png|StartupNetGetRef.png|StartupLogo.png"
|
||||
#define C4FLS_Objects "Names*.txt|Desc*.txt|*.ocd"
|
||||
#define C4FLS_System "*.hlp|*.cnt|Language*.txt|*.fon|*.fnt|*.ttf|*.ttc|*.fot|*.otf|Fonts.txt|StringTbl*.txt|*.c|Names.txt"
|
||||
|
|
|
@ -221,7 +221,7 @@ namespace C4GUI
|
|||
if (fEnabled) if (fHighlight || HasDrawFocus() || (fMouseOver && IsInActiveDlg(false)))
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
// draw the icon
|
||||
|
@ -231,7 +231,7 @@ namespace C4GUI
|
|||
if (fEnabled) if (fDown || fHighlight)
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
// some icon buttons have captions. draw caption below button
|
||||
|
@ -275,7 +275,7 @@ namespace C4GUI
|
|||
if (fEnabled) if (HasDrawFocus() || (fMouseOver && IsInActiveDlg(false)))
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
// draw the arrow - down if pressed
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace C4GUI
|
|||
if ((fMouseOn && IsInActiveDlg(false)) || HasDrawFocus())
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, x0+rcBounds.Hgt*1/4, y0+rcBounds.Hgt*1/4, rcBounds.Hgt*1/2, rcBounds.Hgt*1/2);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, x0+rcBounds.Hgt*1/4, y0+rcBounds.Hgt*1/4, rcBounds.Hgt*1/2, rcBounds.Hgt*1/2);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace C4GUI
|
|||
if ((HasDrawFocus() || iOpenMenu || fMouseOver) && !fReadOnly)
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, x0, y0, rcBounds.Wdt, rcBounds.Hgt);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace C4GUI
|
|||
if (fFocus)
|
||||
{
|
||||
lpDDraw->SetBlitMode(C4GFXBLIT_ADDITIVE);
|
||||
::GraphicsResource.fctButtonHighlight.DrawX(cgo.Surface, (fLarge ? x : x - iTxtWdt/2)+5, y+3, (fLarge ? iMaxWdt : iTxtWdt)-10, iTxtHgt-6);
|
||||
::GraphicsResource.fctButtonHighlightRound.DrawX(cgo.Surface, (fLarge ? x : x - iTxtWdt/2)+5, y+3, (fLarge ? iMaxWdt : iTxtWdt)-10, iTxtHgt-6);
|
||||
lpDDraw->ResetBlitMode();
|
||||
}
|
||||
if (!(pfctClip && pfctIcon))
|
||||
|
|
|
@ -128,6 +128,7 @@ void C4GraphicsResource::Clear()
|
|||
idSfcCaption = idSfcButton = idSfcButtonD = idSfcScroll = idSfcContext = 0;
|
||||
barCaption.Clear(); barButton.Clear(); barButtonD.Clear();
|
||||
fctButtonHighlight.Clear(); fctIcons.Clear(); fctIconsEx.Clear();
|
||||
fctButtonHighlightRound.Clear();
|
||||
fctSubmenu.Clear();
|
||||
fctCheckbox.Clear();
|
||||
fctBigArrows.Clear();
|
||||
|
@ -200,6 +201,7 @@ bool C4GraphicsResource::Init()
|
|||
if (!LoadFile(sfcButtonD, "GUIButtonDown", Files, idSfcButtonD)) return false;
|
||||
barButtonD.SetHorizontal(sfcButtonD);
|
||||
if (!LoadFile(fctButtonHighlight, "GUIButtonHighlight", Files)) return false;
|
||||
if (!LoadFile(fctButtonHighlightRound, "GUIButtonHighlightRound", Files)) return false;
|
||||
if (!LoadFile(fctIcons, "GUIIcons", Files)) return false;
|
||||
fctIcons.Set(fctIcons.Surface,0,0,C4GUI_IconWdt,C4GUI_IconHgt);
|
||||
if (!LoadFile(fctIconsEx, "GUIIcons2", Files)) return false;
|
||||
|
|
|
@ -83,6 +83,7 @@ public:
|
|||
|
||||
C4GUI::DynBarFacet barCaption, barButton, barButtonD;
|
||||
C4FacetID fctButtonHighlight;
|
||||
C4FacetID fctButtonHighlightRound;
|
||||
C4FacetID fctIcons, fctIconsEx;
|
||||
C4FacetID fctSubmenu;
|
||||
C4FacetID fctCheckbox;
|
||||
|
|
Loading…
Reference in New Issue