Skip to content

Commit

Permalink
Manage dialog/Context menu: Rearrange various skin settings on the Ma…
Browse files Browse the repository at this point in the history
…nage dialog and context menu
  • Loading branch information
brianferguson committed Mar 15, 2022
1 parent 1353eae commit fbde826
Show file tree
Hide file tree
Showing 43 changed files with 41 additions and 38 deletions.
Binary file modified Language/Arabic.h
Binary file not shown.
Binary file modified Language/Bulgarian.h
Binary file not shown.
Binary file modified Language/ChineseSimplified.h
Binary file not shown.
Binary file modified Language/ChineseTraditional.h
Binary file not shown.
Binary file modified Language/Croatian.h
Binary file not shown.
Binary file modified Language/Czech.h
Binary file not shown.
Binary file modified Language/Danish.h
Binary file not shown.
Binary file modified Language/Dutch.h
Binary file not shown.
Binary file modified Language/English.h
Binary file not shown.
Binary file modified Language/Finnish.h
Binary file not shown.
Binary file modified Language/French.h
Binary file not shown.
Binary file modified Language/German.h
Binary file not shown.
Binary file modified Language/Greek.h
Binary file not shown.
Binary file modified Language/Hebrew.h
Binary file not shown.
Binary file modified Language/Hungarian.h
Binary file not shown.
1 change: 1 addition & 0 deletions Language/Indonesian.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define STR_XASPERCENTAGE "X sebagai persentase"
#define STR_YASPERCENTAGE "Y sebagai persentase"
#define STR_TRANSPARENCY "Transparansi"
#define STR_ONHOVER "Saat kursor berada diatas"
#define STR_FADEIN "Efek muncul"
#define STR_FADEOUT "Efek menghilang"
#define STR_HIDEONMOUSEOVER "Sembunyikan saat kursor berada diatas"
Expand Down
Binary file modified Language/Italian.h
Binary file not shown.
Binary file modified Language/Japanese.h
Binary file not shown.
Binary file modified Language/Korean.h
Binary file not shown.
Binary file modified Language/Latvian.h
Binary file not shown.
Binary file modified Language/Lithuanian.h
Binary file not shown.
Binary file modified Language/Malay.h
Binary file not shown.
Binary file modified Language/NorwegianBokmal.h
Binary file not shown.
Binary file modified Language/Polish.h
Binary file not shown.
Binary file modified Language/PortugueseBrazil.h
Binary file not shown.
Binary file modified Language/PortuguesePortugal.h
Binary file not shown.
1 change: 1 addition & 0 deletions Language/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ STRINGTABLE
ID_STR_80PERCENT, "80%"
ID_STR_90PERCENT, "90%"
ID_STR_100PERCENT, "~100%"
ID_STR_ONHOVER, STR_ONHOVER
ID_STR_FADEIN, STR_FADEIN
ID_STR_FADEOUT, STR_FADEOUT
ID_STR_HIDEONMOUSEOVER, STR_HIDEONMOUSEOVER
Expand Down
Binary file modified Language/Romanian.h
Binary file not shown.
Binary file modified Language/Russian.h
Binary file not shown.
1 change: 1 addition & 0 deletions Language/SerbianCyrillic.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define STR_XASPERCENTAGE "X као проценат"
#define STR_YASPERCENTAGE "Y као проценат"
#define STR_TRANSPARENCY "Прозирност"
#define STR_ONHOVER "При прелазу миша"
#define STR_FADEIN "Постепено појављивање"
#define STR_FADEOUT "Постепено нестајање"
#define STR_HIDEONMOUSEOVER "Сакриј при преласку миша"
Expand Down
1 change: 1 addition & 0 deletions Language/SerbianLatin.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define STR_XASPERCENTAGE "X kao procenat"
#define STR_YASPERCENTAGE "Y kao procenat"
#define STR_TRANSPARENCY "Prozirnost"
#define STR_ONHOVER "Pri prelazu miša"
#define STR_FADEIN "Postepeno pojavljivanje"
#define STR_FADEOUT "Postepeno nestajanje"
#define STR_HIDEONMOUSEOVER "Sakrij pri prelasku miša"
Expand Down
Binary file modified Language/Slovak.h
Binary file not shown.
Binary file modified Language/Slovenian.h
Binary file not shown.
Binary file modified Language/SpanishModern.h
Binary file not shown.
Binary file modified Language/Swedish.h
Binary file not shown.
Binary file modified Language/Thai.h
Binary file not shown.
Binary file modified Language/Turkish.h
Binary file not shown.
Binary file modified Language/Ukrainian.h
Binary file not shown.
Binary file modified Language/Vietnamese.h
Binary file not shown.
47 changes: 14 additions & 33 deletions Library/ContextMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,18 @@ HMENU ContextMenu::CreateSkinMenu(Skin* skin, int index, HMENU menu)
MENU_ITEM(IDM_SKIN_TRANSPARENCY_70, ID_STR_70PERCENT),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_80, ID_STR_80PERCENT),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_90, ID_STR_90PERCENT),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_100, ID_STR_100PERCENT),
MENU_SEPARATOR(),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_100, ID_STR_100PERCENT)),
MENU_SUBMENU(ID_STR_ONHOVER,
MENU_ITEM(IDM_SKIN_HIDEONMOUSE_NONE, ID_STR_DONOTHING),
MENU_ITEM(IDM_SKIN_HIDEONMOUSE, ID_STR_HIDE),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_FADEIN, ID_STR_FADEIN),
MENU_ITEM(IDM_SKIN_TRANSPARENCY_FADEOUT, ID_STR_FADEOUT)),
MENU_SEPARATOR(),
MENU_ITEM(IDM_SKIN_HIDEONMOUSE, ID_STR_HIDEONMOUSEOVER),
MENU_ITEM(IDM_SKIN_CLICKTHROUGH, ID_STR_CLICKTHROUGH),
MENU_ITEM(IDM_SKIN_DRAGGABLE, ID_STR_DRAGGABLE),
MENU_ITEM(IDM_SKIN_KEEPONSCREEN, ID_STR_KEEPONSCREEN),
MENU_ITEM(IDM_SKIN_REMEMBERPOSITION, ID_STR_SAVEPOSITION),
MENU_ITEM(IDM_SKIN_SNAPTOEDGES, ID_STR_SNAPTOEDGES),
MENU_ITEM(IDM_SKIN_CLICKTHROUGH, ID_STR_CLICKTHROUGH),
MENU_ITEM(IDM_SKIN_KEEPONSCREEN, ID_STR_KEEPONSCREEN),
MENU_ITEM(IDM_SKIN_FAVORITE, ID_STR_FAVORITE)),
MENU_SEPARATOR(),
MENU_ITEM(IDM_SKIN_MANAGESKIN, ID_STR_MANAGESKIN),
Expand Down Expand Up @@ -375,39 +376,19 @@ HMENU ContextMenu::CreateSkinMenu(Skin* skin, int index, HMENU menu)
checkPos = max(0, checkPos);
CheckMenuRadioItem(alphaMenu, checkPos, checkPos, checkPos, MF_BYPOSITION);
}

switch (skin->GetWindowHide())
{
case HIDEMODE_FADEIN:
CheckMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_CHECKED);
EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED);
break;

case HIDEMODE_FADEOUT:
CheckMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_CHECKED);
EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED);
break;

case HIDEMODE_HIDE:
EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEIN, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(alphaMenu, IDM_SKIN_TRANSPARENCY_FADEOUT, MF_BYCOMMAND | MF_GRAYED);
break;
}
}

// Tick the settings
switch (skin->GetWindowHide())
// Tick the mouse over options (On hover)
HMENU hoverMenu = GetSubMenu(settingsMenu, 2);
if (hoverMenu)
{
case HIDEMODE_HIDE:
CheckMenuItem(settingsMenu, IDM_SKIN_HIDEONMOUSE, MF_BYCOMMAND | MF_CHECKED);
break;

case HIDEMODE_FADEIN:
case HIDEMODE_FADEOUT:
EnableMenuItem(settingsMenu, IDM_SKIN_HIDEONMOUSE, MF_BYCOMMAND | MF_GRAYED);
break;
int mode = skin->GetWindowHide();
mode = min(3, mode);
mode = max(0, mode);
CheckMenuRadioItem(hoverMenu, mode, mode, mode, MF_BYPOSITION);
}

// Tick the settings
if (skin->GetSnapEdges())
{
CheckMenuItem(settingsMenu, IDM_SKIN_SNAPTOEDGES, MF_BYCOMMAND | MF_CHECKED);
Expand Down
4 changes: 2 additions & 2 deletions Library/DialogManage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ void DialogManage::TabSkins::Create(HWND owner)
CT_BUTTON(Id_DisplayMonitorButton, ID_STR_DISPLAYMONITOR,
359, 165, 119, 14,
WS_VISIBLE | WS_TABSTOP | WS_DISABLED, 0),
CT_CHECKBOX(Id_DraggableCheckBox, ID_STR_DRAGGABLE,
CT_CHECKBOX(Id_ClickThroughCheckBox, ID_STR_CLICKTHROUGH,
360, 185, 118, 9,
WS_VISIBLE | WS_TABSTOP | WS_DISABLED, 0),
CT_CHECKBOX(Id_ClickThroughCheckBox, ID_STR_CLICKTHROUGH,
CT_CHECKBOX(Id_DraggableCheckBox, ID_STR_DRAGGABLE,
360, 198, 118, 9,
WS_VISIBLE | WS_TABSTOP | WS_DISABLED, 0),
CT_CHECKBOX(Id_KeepOnScreenCheckBox, ID_STR_KEEPONSCREEN,
Expand Down
22 changes: 19 additions & 3 deletions Library/Skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3869,16 +3869,32 @@ LRESULT Skin::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
break;

case IDM_SKIN_HIDEONMOUSE_NONE:
if (m_WindowHide != HIDEMODE_NONE)
{
SetWindowHide(HIDEMODE_NONE);
}
break;

case IDM_SKIN_HIDEONMOUSE:
SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_HIDE : HIDEMODE_NONE);
if (m_WindowHide != HIDEMODE_HIDE)
{
SetWindowHide(HIDEMODE_HIDE);
}
break;

case IDM_SKIN_TRANSPARENCY_FADEIN:
SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_FADEIN : HIDEMODE_NONE);
if (m_WindowHide != HIDEMODE_FADEIN)
{
SetWindowHide(HIDEMODE_FADEIN);
}
break;

case IDM_SKIN_TRANSPARENCY_FADEOUT:
SetWindowHide((m_WindowHide == HIDEMODE_NONE) ? HIDEMODE_FADEOUT : HIDEMODE_NONE);
if (m_WindowHide != HIDEMODE_FADEOUT)
{
SetWindowHide(HIDEMODE_FADEOUT);
}
break;

case IDM_SKIN_REMEMBERPOSITION:
Expand Down
2 changes: 2 additions & 0 deletions Library/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
#define ID_STR_AUTOMATICUPDATE 2160
#define ID_STR_INSTALL_NEW_VERSION 2161
#define ID_STR_CLICK_TO_INSTALL 2162
#define ID_STR_ONHOVER 2163

#define ID_STR_GAMEMODE 2800
#define ID_STR_GAMEMODE_START 2801
Expand Down Expand Up @@ -360,6 +361,7 @@
#define IDM_GAMEMODE_FULLSCREEN 4078
#define IDM_GAMEMODE_PROCESSLIST 4079
#define IDM_INSTALL_NEW_VERSION 4080
#define IDM_SKIN_HIDEONMOUSE_NONE 4081

#define IDM_SKIN_CUSTOMCONTEXTMENU_FIRST 9000
#define IDM_SKIN_CUSTOMCONTEXTMENU_LAST 9024
Expand Down

0 comments on commit fbde826

Please sign in to comment.