OpenClonk
C4GUI Namespace Reference

Classes

class  CallbackButton
 
class  MenuHandler
 
class  ContextHandler
 
class  BaseCallbackHandler
 
class  CallbackHandler
 
class  CallbackHandlerNoPar
 
class  CallbackHandlerExPar
 
class  BaseParCallbackHandler
 
class  ParCallbackHandler
 
struct  DynBarFacet
 
struct  ScrollBarFacets
 
class  Element
 
class  Label
 
class  WoodenLabel
 
class  MultilineLabel
 
class  ProgressBar
 
class  HorizontalLine
 
class  Picture
 
class  OverlayPicture
 
class  Icon
 
class  Container
 
class  Window
 
class  ScrollBar
 
class  ScrollWindow
 
class  GroupBox
 
class  PaintBox
 
class  Control
 
class  DlgCallback
 
class  DlgCallbackEx
 
class  Button
 
class  IconButton
 
class  ArrowButton
 
class  FacetButton
 
class  CallbackButtonEx
 
class  Edit
 
class  CallbackEdit
 
class  RenameEdit
 
class  CallbackRenameEdit
 
class  LabeledEdit
 
class  CheckBox
 
class  ListBox
 
class  Tabular
 
class  TextWindow
 
class  ContextMenu
 
class  ContextButton
 
class  ComboBox_FillCB
 
class  ComboBox_FillCallback
 
class  ComboBox
 
class  DialogWindow
 
class  FrameDecoration
 
class  Dialog
 
class  FullscreenDialog
 
class  CloseButton
 
class  CloseIconButton
 
class  OKButton
 
class  OKIconButton
 
class  CancelButton
 
class  CancelIconButton
 
class  DlgCloseButton
 
class  YesButton
 
class  NoButton
 
class  RetryButton
 
class  ResetButton
 
class  MessageDialog
 
class  ConfirmationDialog
 
class  ProgressDialog
 
class  BaseInputCallback
 
class  InputCallback
 
class  InputDialog
 
class  InfoDialog
 
class  DlgKeyCB
 
class  DlgKeyCBPassKey
 
class  DlgKeyCBEx
 
class  ControlKeyCB
 
class  ControlKeyCBExPassKey
 
class  ControlKeyDlgCB
 
class  CMouse
 
class  Screen
 
class  CBMenuHandler
 
class  CBMenuHandlerEx
 
class  CBContextHandler
 
class  ComponentAligner
 
class  SortCompareElements
 

Enumerations

enum  { Ico_Extended = 0x100 , Ico_Controller = 0x200 }
 
enum  Icons {
  Ico_Empty = -2 , Ico_None = -1 , Ico_Clonk = 0 , Ico_Notify = 1 ,
  Ico_Wait = 2 , Ico_NetWait = 3 , Ico_Host = 4 , Ico_Client = 5 ,
  Ico_UnknownClient = 6 , Ico_UnknownPlayer = 7 , Ico_ObserverClient = 8 , Ico_Player = 9 ,
  Ico_Resource = 10 , Ico_Error = 11 , Ico_SavegamePlayer = 12 , Ico_Save = 13 ,
  Ico_Active = 14 , Ico_Options = 14 , Ico_Editor = 14 , Ico_Inactive = 15 ,
  Ico_Kick = 16 , Ico_Loading = 17 , Ico_Confirm = 18 , Ico_Team = 19 ,
  Ico_AddPlr = 20 , Ico_Record = 21 , Ico_Chart = 21 , Ico_Gfx = 22 ,
  Ico_Sound = 23 , Ico_Keyboard = 24 , Ico_Gamepad = 25 , Ico_MouseOff = 26 ,
  Ico_MouseOn = 27 , Ico_Help = 28 , Ico_Definition = 29 , Ico_GameRunning = 30 ,
  Ico_Lobby = 31 , Ico_RuntimeJoin = 32 , Ico_Exit = 33 , Ico_Close = 34 ,
  Ico_Rank1 = 35 , Ico_Rank2 = 36 , Ico_Rank3 = 37 , Ico_Rank4 = 38 ,
  Ico_Rank5 = 39 , Ico_Rank6 = 40 , Ico_Rank7 = 41 , Ico_Rank8 = 42 ,
  Ico_Rank9 = 43 , Ico_OfficialServer = 44 , Ico_Surrender = 45 , Ico_MeleeLeague = 46 ,
  Ico_Ready = 47 , Ico_Star = 48 , Ico_Disconnect = 49 , Ico_View = 50 ,
  Ico_Ignored = 52 , Ico_Ex_RecordOff = Ico_Extended + 0 , Ico_Ex_RecordOn = Ico_Extended + 1 , Ico_Ex_NormalCrew = Ico_Extended + 3 ,
  Ico_Ex_LeagueOff = Ico_Extended + 4 , Ico_Ex_LeagueOn = Ico_Extended + 5 , Ico_Ex_InternetOff = Ico_Extended + 6 , Ico_Ex_InternetOn = Ico_Extended + 7 ,
  Ico_Ex_League = Ico_Extended + 8 , Ico_Ex_NormalCrewGray = Ico_Extended + 10 , Ico_Ex_Locked = Ico_Extended + 11 , Ico_Ex_Unlocked = Ico_Extended + 12 ,
  Ico_Ex_LockedFrontal = Ico_Extended + 13 , Ico_Ex_Update = Ico_Extended + 14 , Ico_Ex_Chat = Ico_Extended + 15 , Ico_Ex_GameList = Ico_Extended + 16 ,
  Ico_Ex_Comment = Ico_Extended + 17 , Ico_Controller_A = Ico_Controller + 0 , Ico_Controller_B = Ico_Controller + 3 , Ico_Controller_X = Ico_Controller + 17 ,
  Ico_Controller_Y = Ico_Controller + 18 , Ico_Controller_Back = Ico_Controller + 1 , Ico_Controller_Start = Ico_Controller + 16 , Ico_Controller_Dpad = Ico_Controller + 6 ,
  Ico_Controller_DpadLeft = Ico_Controller + 5 , Ico_Controller_DpadRight = Ico_Controller + 7 , Ico_Controller_DpadDown = Ico_Controller + 4 , Ico_Controller_DpadUp = Ico_Controller + 8 ,
  Ico_Controller_LeftShoulder = Ico_Controller + 9 , Ico_Controller_RightShoulder = Ico_Controller + 12 , Ico_Controller_LeftTrigger = Ico_Controller + 11 , Ico_Controller_RightTrigger = Ico_Controller + 14 ,
  Ico_Controller_LeftStick = Ico_Controller + 10 , Ico_Controller_RightStick = Ico_Controller + 13
}
 

Functions

bool ExpandHotkeyMarkup (StdStrBuf &sText, uint32_t &rcHotkey, bool for_tooltip)
 
DWORD MakeColorReadableOnBlack (DWORD &rdwClr)
 
void GUISound (const char *szSound)
 
bool IsActive ()
 
bool IsExclusive ()
 
int32_t GetScreenWdt ()
 
int32_t GetScreenHgt ()
 
float GetZoom ()
 
void MouseMove (int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam, class C4Viewport *pVP)
 
bool IsWholeWordSpacer (unsigned char c)
 

Variables

Screen TheScreen
 

Class Documentation

◆ C4GUI::DlgCallback

class C4GUI::DlgCallback

template<class CallbackDlg>
class C4GUI::DlgCallback< CallbackDlg >

Definition at line 1074 of file C4Gui.h.

Inheritance diagram for C4GUI::DlgCallback< CallbackDlg >:
[legend]
Class Members
typedef bool(* Bool2Func
typedef bool(* BoolFunc
typedef void(* ContextClickFunc
typedef ContextMenu *(* ContextFunc
typedef void(* Func

◆ C4GUI::DlgCallbackEx

class C4GUI::DlgCallbackEx

template<class CallbackDlg, class TEx>
class C4GUI::DlgCallbackEx< CallbackDlg, TEx >

Definition at line 1085 of file C4Gui.h.

Inheritance diagram for C4GUI::DlgCallbackEx< CallbackDlg, TEx >:
[legend]
Class Members
typedef void(* ContextClickFunc

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Ico_Extended 
Ico_Controller 

Definition at line 632 of file C4Gui.h.

633  {
634  Ico_Extended = 0x100, // icon index offset for extended icons
635  Ico_Controller = 0x200,
636  };
@ Ico_Extended
Definition: C4Gui.h:634
@ Ico_Controller
Definition: C4Gui.h:635

◆ Icons

Enumerator
Ico_Empty 
Ico_None 
Ico_Clonk 
Ico_Notify 
Ico_Wait 
Ico_NetWait 
Ico_Host 
Ico_Client 
Ico_UnknownClient 
Ico_UnknownPlayer 
Ico_ObserverClient 
Ico_Player 
Ico_Resource 
Ico_Error 
Ico_SavegamePlayer 
Ico_Save 
Ico_Active 
Ico_Options 
Ico_Editor 
Ico_Inactive 
Ico_Kick 
Ico_Loading 
Ico_Confirm 
Ico_Team 
Ico_AddPlr 
Ico_Record 
Ico_Chart 
Ico_Gfx 
Ico_Sound 
Ico_Keyboard 
Ico_Gamepad 
Ico_MouseOff 
Ico_MouseOn 
Ico_Help 
Ico_Definition 
Ico_GameRunning 
Ico_Lobby 
Ico_RuntimeJoin 
Ico_Exit 
Ico_Close 
Ico_Rank1 
Ico_Rank2 
Ico_Rank3 
Ico_Rank4 
Ico_Rank5 
Ico_Rank6 
Ico_Rank7 
Ico_Rank8 
Ico_Rank9 
Ico_OfficialServer 
Ico_Surrender 
Ico_MeleeLeague 
Ico_Ready 
Ico_Star 
Ico_Disconnect 
Ico_View 
Ico_Ignored 
Ico_Ex_RecordOff 
Ico_Ex_RecordOn 
Ico_Ex_NormalCrew 
Ico_Ex_LeagueOff 
Ico_Ex_LeagueOn 
Ico_Ex_InternetOff 
Ico_Ex_InternetOn 
Ico_Ex_League 
Ico_Ex_NormalCrewGray 
Ico_Ex_Locked 
Ico_Ex_Unlocked 
Ico_Ex_LockedFrontal 
Ico_Ex_Update 
Ico_Ex_Chat 
Ico_Ex_GameList 
Ico_Ex_Comment 
Ico_Controller_A 
Ico_Controller_B 
Ico_Controller_X 
Ico_Controller_Y 
Ico_Controller_Back 
Ico_Controller_Start 
Ico_Controller_Dpad 
Ico_Controller_DpadLeft 
Ico_Controller_DpadRight 
Ico_Controller_DpadDown 
Ico_Controller_DpadUp 
Ico_Controller_LeftShoulder 
Ico_Controller_RightShoulder 
Ico_Controller_LeftTrigger 
Ico_Controller_RightTrigger 
Ico_Controller_LeftStick 
Ico_Controller_RightStick 

Definition at line 637 of file C4Gui.h.

638  {
639  Ico_Empty = -2, // for context menus only
640  Ico_None = -1,
641  Ico_Clonk = 0,
642  Ico_Notify = 1,
643  Ico_Wait = 2,
644  Ico_NetWait = 3,
645  Ico_Host = 4,
646  Ico_Client = 5,
647  Ico_UnknownClient = 6,
648  Ico_UnknownPlayer = 7,
649  Ico_ObserverClient = 8,
650  Ico_Player = 9,
651  Ico_Resource = 10,
652  Ico_Error = 11,
653  Ico_SavegamePlayer = 12,
654  Ico_Save = 13,
655  Ico_Active = 14,
656  Ico_Options = 14,
657  Ico_Editor = 14,
658  Ico_Inactive = 15,
659  Ico_Kick = 16,
660  Ico_Loading = 17,
661  Ico_Confirm = 18,
662  Ico_Team = 19,
663  Ico_AddPlr = 20,
664  Ico_Record = 21,
665  Ico_Chart = 21,
666  Ico_Gfx = 22,
667  Ico_Sound = 23,
668  Ico_Keyboard = 24,
669  Ico_Gamepad = 25,
670  Ico_MouseOff = 26,
671  Ico_MouseOn = 27,
672  Ico_Help = 28,
673  Ico_Definition = 29,
674  Ico_GameRunning = 30,
675  Ico_Lobby = 31,
676  Ico_RuntimeJoin = 32,
677  Ico_Exit = 33,
678  Ico_Close = 34,
679  Ico_Rank1 = 35,
680  Ico_Rank2 = 36,
681  Ico_Rank3 = 37,
682  Ico_Rank4 = 38,
683  Ico_Rank5 = 39,
684  Ico_Rank6 = 40,
685  Ico_Rank7 = 41,
686  Ico_Rank8 = 42,
687  Ico_Rank9 = 43,
688  Ico_OfficialServer = 44,
689  Ico_Surrender = 45,
690  Ico_MeleeLeague = 46,
691  Ico_Ready = 47,
692  Ico_Star = 48,
693  Ico_Disconnect = 49,
694  Ico_View = 50,
695 // Ico_RegJoinOnly = 51,
696  Ico_Ignored = 52,
697 
700 // Ico_Ex_FairCrew = Ico_Extended + 2,
707 // Ico_Ex_FairCrewGray = Ico_Extended + 9,
713  Ico_Ex_Chat = Ico_Extended + 15,
716 
734  };
@ Ico_Host
Definition: C4Gui.h:645
@ Ico_Controller_X
Definition: C4Gui.h:719
@ Ico_Controller_Back
Definition: C4Gui.h:721
@ Ico_Controller_LeftStick
Definition: C4Gui.h:732
@ Ico_Controller_LeftTrigger
Definition: C4Gui.h:730
@ Ico_Notify
Definition: C4Gui.h:642
@ Ico_Editor
Definition: C4Gui.h:657
@ Ico_Options
Definition: C4Gui.h:656
@ Ico_Ex_LeagueOff
Definition: C4Gui.h:702
@ Ico_Ex_Update
Definition: C4Gui.h:712
@ Ico_Lobby
Definition: C4Gui.h:675
@ Ico_View
Definition: C4Gui.h:694
@ Ico_Rank1
Definition: C4Gui.h:679
@ Ico_None
Definition: C4Gui.h:640
@ Ico_Inactive
Definition: C4Gui.h:658
@ Ico_NetWait
Definition: C4Gui.h:644
@ Ico_Rank6
Definition: C4Gui.h:684
@ Ico_Rank5
Definition: C4Gui.h:683
@ Ico_Ex_NormalCrew
Definition: C4Gui.h:701
@ Ico_Ex_Unlocked
Definition: C4Gui.h:710
@ Ico_UnknownClient
Definition: C4Gui.h:647
@ Ico_Sound
Definition: C4Gui.h:667
@ Ico_Gfx
Definition: C4Gui.h:666
@ Ico_Ex_LockedFrontal
Definition: C4Gui.h:711
@ Ico_Ex_RecordOff
Definition: C4Gui.h:698
@ Ico_Ex_Locked
Definition: C4Gui.h:709
@ Ico_Controller_DpadUp
Definition: C4Gui.h:727
@ Ico_Rank7
Definition: C4Gui.h:685
@ Ico_Team
Definition: C4Gui.h:662
@ Ico_Definition
Definition: C4Gui.h:673
@ Ico_Surrender
Definition: C4Gui.h:689
@ Ico_Ready
Definition: C4Gui.h:691
@ Ico_Controller_DpadRight
Definition: C4Gui.h:725
@ Ico_Rank3
Definition: C4Gui.h:681
@ Ico_Ex_LeagueOn
Definition: C4Gui.h:703
@ Ico_MouseOff
Definition: C4Gui.h:670
@ Ico_Chart
Definition: C4Gui.h:665
@ Ico_Star
Definition: C4Gui.h:692
@ Ico_AddPlr
Definition: C4Gui.h:663
@ Ico_Resource
Definition: C4Gui.h:651
@ Ico_Controller_DpadDown
Definition: C4Gui.h:726
@ Ico_Ex_Comment
Definition: C4Gui.h:715
@ Ico_Ex_InternetOn
Definition: C4Gui.h:705
@ Ico_Rank8
Definition: C4Gui.h:686
@ Ico_Controller_RightStick
Definition: C4Gui.h:733
@ Ico_Controller_Dpad
Definition: C4Gui.h:723
@ Ico_Ex_InternetOff
Definition: C4Gui.h:704
@ Ico_MouseOn
Definition: C4Gui.h:671
@ Ico_Ex_League
Definition: C4Gui.h:706
@ Ico_Controller_A
Definition: C4Gui.h:717
@ Ico_Ignored
Definition: C4Gui.h:696
@ Ico_ObserverClient
Definition: C4Gui.h:649
@ Ico_RuntimeJoin
Definition: C4Gui.h:676
@ Ico_OfficialServer
Definition: C4Gui.h:688
@ Ico_Gamepad
Definition: C4Gui.h:669
@ Ico_Client
Definition: C4Gui.h:646
@ Ico_Kick
Definition: C4Gui.h:659
@ Ico_Wait
Definition: C4Gui.h:643
@ Ico_Ex_RecordOn
Definition: C4Gui.h:699
@ Ico_Clonk
Definition: C4Gui.h:641
@ Ico_Player
Definition: C4Gui.h:650
@ Ico_Ex_NormalCrewGray
Definition: C4Gui.h:708
@ Ico_Controller_Start
Definition: C4Gui.h:722
@ Ico_Rank2
Definition: C4Gui.h:680
@ Ico_Disconnect
Definition: C4Gui.h:693
@ Ico_Keyboard
Definition: C4Gui.h:668
@ Ico_Close
Definition: C4Gui.h:678
@ Ico_Confirm
Definition: C4Gui.h:661
@ Ico_Ex_Chat
Definition: C4Gui.h:713
@ Ico_Controller_LeftShoulder
Definition: C4Gui.h:728
@ Ico_UnknownPlayer
Definition: C4Gui.h:648
@ Ico_Loading
Definition: C4Gui.h:660
@ Ico_Record
Definition: C4Gui.h:664
@ Ico_Empty
Definition: C4Gui.h:639
@ Ico_Error
Definition: C4Gui.h:652
@ Ico_Controller_RightShoulder
Definition: C4Gui.h:729
@ Ico_Controller_DpadLeft
Definition: C4Gui.h:724
@ Ico_Rank9
Definition: C4Gui.h:687
@ Ico_Exit
Definition: C4Gui.h:677
@ Ico_SavegamePlayer
Definition: C4Gui.h:653
@ Ico_Rank4
Definition: C4Gui.h:682
@ Ico_Controller_RightTrigger
Definition: C4Gui.h:731
@ Ico_Help
Definition: C4Gui.h:672
@ Ico_Save
Definition: C4Gui.h:654
@ Ico_Controller_B
Definition: C4Gui.h:718
@ Ico_Active
Definition: C4Gui.h:655
@ Ico_GameRunning
Definition: C4Gui.h:674
@ Ico_Ex_GameList
Definition: C4Gui.h:714
@ Ico_MeleeLeague
Definition: C4Gui.h:690
@ Ico_Controller_Y
Definition: C4Gui.h:720

Function Documentation

◆ ExpandHotkeyMarkup()

bool C4GUI::ExpandHotkeyMarkup ( StdStrBuf sText,
uint32_t &  rcHotkey,
bool  for_tooltip 
)

Definition at line 38 of file C4Gui.cpp.

39  {
40  const char *HotkeyMarkup = (for_tooltip ? "<c ff800000>%s</c>" : "<c ffffff7f>%s</c>");
41 
42  StdStrBuf output;
43 
44  const char *input = sText.getData();
45  rcHotkey = 0;
46 
47  // Iterate over all input characters
48  while (input && *input)
49  {
50  if (*input != '&')
51  {
52  // This will correctly copy UTF-8 chars too
53  output.AppendChar(*input++);
54  }
55  else
56  {
57  ++input;
58  if (*input == '\0' || *input == '&')
59  {
60  // If the ampersand is followed by another ampersand, or it is the last character, copy it verbatimly
61  // Note: This means you can't use an ampersand as an accelerator key.
62  output.AppendChar(*input);
63  }
64  else
65  {
66  // Store the start of the hotkey so we can copy it later
67  const char *accel_start = input;
68  rcHotkey = GetNextCharacter(&input);
69  // Using std::string because StdStrBuf doesn't have a ctor from two iterators
70  std::string accel(accel_start, input);
71  output.AppendFormat(HotkeyMarkup, accel.c_str());
72 
73  // Converting a char code to upper case isn't trivial for unicode. (This should really just use ICU.)
74  if (Inside(rcHotkey, static_cast<uint32_t>('a'), static_cast<uint32_t>('z')))
75  {
76  rcHotkey += static_cast<uint32_t>('A') - 'a';
77  }
78  else if (!Inside(rcHotkey, static_cast<uint32_t>('A'), static_cast<uint32_t>('Z')))
79  {
80  // Warn about accelerator keys outside the basic latin alphabet.
81  LogF(LoadResStr("IDS_ERR_UNSUPPORTED_ACCELERATOR"), accel.c_str(), sText.getData());
82  }
83  }
84  }
85  }
86 
87  if (rcHotkey == 0)
88  {
89  // No accelerator found
90  return false;
91  }
92 
93  sText.Take(output);
94  // done, success
95  return true;
96  }
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:262
uint32_t GetNextCharacter(const char **pszString)
Definition: Standard.h:84
bool Inside(T ival, U lbound, V rbound)
Definition: Standard.h:43
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:190
const char * getData() const
Definition: StdBuf.h:442
void AppendChar(char cChar)
Definition: StdBuf.h:588
void Take(char *pnData)
Definition: StdBuf.h:457

References StdStrBuf::AppendChar(), StdStrBuf::AppendFormat(), StdStrBuf::getData(), GetNextCharacter(), Inside(), LoadResStr(), LogF(), and StdStrBuf::Take().

Referenced by C4GUI::CheckBox::CheckBox(), C4GUI::ContextMenu::Entry::Entry(), C4GUI::IconButton::IconButton(), C4GUI::Button::SetText(), C4GUI::Label::SetText(), C4GUI::Tabular::Sheet::SetTitle(), and C4GUI::Tabular::Sheet::Sheet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScreenHgt()

int32_t C4GUI::GetScreenHgt ( )
inline

Definition at line 2825 of file C4Gui.h.

2825 { return Screen::GetScreenS()->GetBounds().Hgt; }

References C4GUI::Element::GetBounds(), C4GUI::Screen::GetScreenS(), and C4Rect::Hgt.

Referenced by C4GraphicsSystem::DoSaveScreenshot(), C4Game::InitFullscreenComponents(), C4MapFolderData::Load(), C4Application::PreInit(), C4ViewportList::RecalculateViewports(), and C4Game::SaveGameTitle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScreenWdt()

int32_t C4GUI::GetScreenWdt ( )
inline

Definition at line 2824 of file C4Gui.h.

2824 { return Screen::GetScreenS()->GetBounds().Wdt; }

References C4GUI::Element::GetBounds(), C4GUI::Screen::GetScreenS(), and C4Rect::Wdt.

Referenced by C4GraphicsSystem::DoSaveScreenshot(), C4UpperBoard::Draw(), C4Game::InitFullscreenComponents(), IsSmallInputQuery(), C4MapFolderData::Load(), C4Application::PreInit(), C4ViewportList::RecalculateViewports(), and C4Game::SaveGameTitle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetZoom()

float C4GUI::GetZoom ( )
inline

Definition at line 2831 of file C4Gui.h.

2831 { return Screen::GetScreenS()->GetZoom(); }

References C4GUI::Screen::GetScreenS(), and C4GUI::Screen::GetZoom().

Referenced by C4GUI::Screen::SetMouseInGUI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GUISound()

void C4GUI::GUISound ( const char *  szSound)

Definition at line 1175 of file C4Gui.cpp.

1176  {
1177  if (Config.Sound.FESamples)
1178  StartSoundEffect(szSound);
1179  }
C4Config Config
Definition: C4Config.cpp:930
C4SoundInstance * StartSoundEffect(const char *szSndName, bool fLoop, int32_t iVolume, C4Object *pObj, int32_t iCustomFalloffDistance, int32_t iPitch, C4SoundModifier *modifier)
C4ConfigSound Sound
Definition: C4Config.h:258
int32_t FESamples
Definition: C4Config.h:129

References Config, C4ConfigSound::FESamples, C4Config::Sound, and StartSoundEffect().

Referenced by C4GUI::ContextMenu::Abort(), C4StartupScenSelDlg::DeselectAll(), C4GUI::ContextMenu::DoOK(), C4StartupNetDlg::DoRefresh(), C4GUI::ScrollBar::MouseInput(), C4GUI::Tabular::MouseInput(), C4GUI::Tabular::MouseLeaveCaptionArea(), C4GameLobby::MainDlg::OnChatInput(), C4GameOptionButtons::OnCommentSet(), C4GameOptionButtons::OnPasswordSet(), C4GUI::ContextMenu::Open(), C4GUI::ListBox::SelectionChanged(), C4GUI::ContextMenu::SelectionChanged(), C4GUI::Button::SetDown(), C4GUI::Button::SetUp(), and C4GUI::CheckBox::ToggleCheck().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsActive()

bool C4GUI::IsActive ( )
inline

Definition at line 2820 of file C4Gui.h.

2820 { return Screen::GetScreenS()->IsActive(); }

References C4GUI::Screen::GetScreenS(), and C4GUI::Screen::IsActive().

Referenced by C4GraphicsSystem::Execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsExclusive()

bool C4GUI::IsExclusive ( )
inline

Definition at line 2821 of file C4Gui.h.

2821 { return Screen::GetScreenS()->IsExclusive(); }

References C4GUI::Screen::GetScreenS(), and C4GUI::Screen::IsExclusive().

Here is the call graph for this function:

◆ IsWholeWordSpacer()

bool C4GUI::IsWholeWordSpacer ( unsigned char  c)

Definition at line 350 of file C4GuiEdit.cpp.

351  {
352  // characters that make up a space between words
353  // the extended characters are all seen a letters, because they vary in different
354  // charsets (danish, french, etc.) and are likely to represent localized letters
355  return !Inside<char>(c, 'A', 'Z')
356  && !Inside<char>(c, 'a', 'z')
357  && !Inside<char>(c, '0', '9')
358  && c!='_' && c<127;
359  }

Referenced by C4GUI::Edit::GetCurrentWord(), and C4GUI::Edit::MouseInput().

Here is the caller graph for this function:

◆ MakeColorReadableOnBlack()

DWORD C4GUI::MakeColorReadableOnBlack ( DWORD rdwClr)

Definition at line 98 of file C4Gui.cpp.

99  {
100  // max alpha
101  DWORD dwAlpha = std::max<DWORD>(rdwClr>>24&255, 0xff)<<24;
102  rdwClr &= 0xffffff;
103  // determine brightness
104  // 50% red, 87% green, 27% blue (max 164 * 255)
105  DWORD r=(rdwClr>>16&255), g=(rdwClr>>8&255), b=(rdwClr&255);
106  int32_t iLightness = r*50 + g*87 + b*27;
107  // above 65/164 (*255) is OK
108  if (iLightness < 16575)
109  {
110  int32_t iInc = (16575-iLightness) / 164;
111  // otherwise, lighten
112  rdwClr = (std::min<DWORD>(r+iInc, 255)<<16) | (std::min<DWORD>(g+iInc, 255)<<8) | std::min<DWORD>(b+iInc, 255);
113  }
114  // return color and alpha
115  rdwClr |= dwAlpha;
116  return rdwClr;
117  }
#define b
uint32_t DWORD

References b.

Referenced by C4GUI::MultilineLabel::AddLine(), C4Player::CreateGraphs(), C4MainMenu::DoRefillInternal(), C4GUI::Label::Label(), and C4GUI::Label::SetColor().

Here is the caller graph for this function:

◆ MouseMove()

void C4GUI::MouseMove ( int32_t  iButton,
int32_t  iX,
int32_t  iY,
DWORD  dwKeyParam,
class C4Viewport pVP 
)
inline

Definition at line 2832 of file C4Gui.h.

2833  { Screen::GetScreenS()->MouseMove(iButton, iX, iY, dwKeyParam, pVP); }

References C4GUI::Screen::GetScreenS(), and C4GUI::Screen::MouseMove().

Here is the call graph for this function:

Variable Documentation

◆ TheScreen

Screen C4GUI::TheScreen

Definition at line 1054 of file C4Gui.cpp.

Referenced by C4StartupNetDlg::DoOK(), and C4StartupMainDlg::OnEditorBtn().