OpenClonk
C4AppDelegate(MainMenuActions) Category Reference

#import <C4AppDelegate+MainMenuActions.h>

Instance Methods

(IBAction) - openScenario:
 
(IBAction) - openScenarioWithPlayers:
 
(IBAction) - closeScenario:
 
(IBAction) - saveGameAs:
 
(IBAction) - saveScenario:
 
(IBAction) - saveScenarioAs:
 
(IBAction) - record:
 
(IBAction) - newViewport:
 
(IBAction) - openPropTools:
 
(IBAction) - newViewportForPlayer:
 
(IBAction) - joinPlayer:
 
(IBAction) - showAbout:
 
(IBAction) - toggleFullScreen:
 
(IBAction) - togglePause:
 
(IBAction) - setConsoleMode:
 
(IBAction) - setDrawingTool:
 
(IBAction) - suggestQuitting:
 
(IBAction) - simulateKeyPressed:
 
(IBAction) - visitWebsite:
 
(IBAction) - makeScreenshot:
 
(IBAction) - makeScreenshotOfWholeMap:
 

Detailed Description

Definition at line 19 of file C4AppDelegate+MainMenuActions.h.

Method Documentation

◆ closeScenario:

- (IBAction) closeScenario: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

40  :(id)sender
41 {
43  [editorWindowController.window setRepresentedFilename:@""];
44 }
C4Console Console
Definition: C4Globals.cpp:45
bool FileClose()
Definition: C4Console.cpp:382

◆ joinPlayer:

- (IBAction) joinPlayer: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

77  :(id)sender
78 {
80 }
void PlayerJoin()
Definition: C4Console.cpp:513

◆ makeScreenshot:

- (IBAction) makeScreenshot: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

196  :(id)sender
197 {
199 }
C4GraphicsSystem GraphicsSystem
Definition: C4Globals.cpp:51
bool SaveScreenshotKey(bool save_all)

◆ makeScreenshotOfWholeMap:

- (IBAction) makeScreenshotOfWholeMap: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

201  :(id)sender
202 {
204 }

◆ newViewport:

- (IBAction) newViewport: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

67  :(id)sender
68 {
70 }
void ViewportNew()
Definition: C4Console.cpp:456

◆ newViewportForPlayer:

- (IBAction) newViewportForPlayer: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

72  :(id)sender
73 {
74  ::Viewports.CreateViewport([sender tag]);
75 }
C4ViewportList Viewports
bool CreateViewport(int32_t player_nr, bool silent=false)

◆ openPropTools:

- (IBAction) openPropTools: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

82  :(id)sender
83 {
85 }
C4EditCursor EditCursor
Definition: C4Console.h:90
bool OpenPropTools()

◆ openScenario:

- (IBAction) openScenario: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

30  :(id)sender
31 {
32  Console.FileOpen();
33 }
bool FileOpen(const char *filename=nullptr, bool host_in_network=false)
Definition: C4Console.cpp:319

◆ openScenarioWithPlayers:

- (IBAction) openScenarioWithPlayers: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

35  :(id)sender
36 {
38 }
bool FileOpenWPlrs()
Definition: C4Console.cpp:343

◆ record:

- (IBAction) record: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

62  :(id)sender
63 {
65 }
bool FileRecord()
Definition: C4Console.cpp:394

◆ saveGameAs:

- (IBAction) saveGameAs: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

47  :(id)sender
48 {
49  Console.FileSaveAs(true);
50 }
bool FileSaveAs(bool fSaveGame, bool export_packed=false)
Definition: C4Console.cpp:269

◆ saveScenario:

- (IBAction) saveScenario: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

52  :(id)sender
53 {
54  Console.FileSave();
55 }
bool FileSave()
Definition: C4Console.cpp:262

◆ saveScenarioAs:

- (IBAction) saveScenarioAs: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

57  :(id)sender
58 {
59  Console.FileSaveAs(false);
60 }

◆ setConsoleMode:

- (IBAction) setConsoleMode: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

109  :(id)sender
110 {
111  [editorWindowController selectMode:sender];
112  [editorWindowController.modeSelector selectSegmentWithTag:[sender tag]];
113 }

◆ setDrawingTool:

- (IBAction) setDrawingTool: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

115  :(id)sender
116 {
117  [editorWindowController selectTool:sender];
118  [editorWindowController.toolSelector selectSegmentWithTag:[sender tag]];
119 }

◆ showAbout:

- (IBAction) showAbout: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

87  :(id)sender
88 {
90 }
void HelpAbout()
Definition: C4Console.cpp:449

◆ simulateKeyPressed:

- (void) simulateKeyPressed: (C4KeyCode key

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

190  :(C4KeyCode)key
191 {
192  Game.DoKeyboardInput(key, KEYEV_Down, false, false, false, false, NULL);
193  Game.DoKeyboardInput(key, KEYEV_Up, false, false, false, false, NULL);
194 }
C4Game Game
Definition: C4Globals.cpp:52
@ KEYEV_Up
@ KEYEV_Down
unsigned long C4KeyCode
bool DoKeyboardInput(C4KeyCode vk_code, C4KeyEventType event_type, bool alt, bool ctrl, bool shift, bool repeated, class C4GUI::Dialog *for_dialog=nullptr, bool fPlrCtrlOnly=false, int32_t strength=-1)
Definition: C4Game.cpp:2288

◆ suggestQuitting:

- (IBAction) suggestQuitting: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

121  :(id)sender
122 {
124  {
125  NSLog(@"Game running, only simulating Esc key");
126  [self simulateKeyPressed:K_ESCAPE];
127  }
128  else
129  {
130  if (Application.isEditor)
131  Console.FileClose();
134  Application.Clear();
135  Application.Quit();
136  }
137 }
C4Application Application
Definition: C4Globals.cpp:44
bool fQuitMsgReceived
Definition: C4App.h:81
void Clear() override
void Quit() override
bool IsRunning
Definition: C4Game.h:140
bool ScheduleProcs(int iTimeout=1000/36)

◆ toggleFullScreen:

- (IBAction) toggleFullScreen: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

92  :(id)sender
93 {
95  {
96  NSBeep();
97  return;
98  }
99  [gameWindowController setFullscreen:Config.Graphics.Windowed];
101 
102 }
C4Config Config
Definition: C4Config.cpp:930
int32_t Windowed
Definition: C4Config.h:107
C4ConfigGraphics Graphics
Definition: C4Config.h:257

◆ togglePause:

- (IBAction) togglePause: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

104  :(id)sender
105 {
106  [self simulateKeyPressed:K_PAUSE];
107 }

◆ visitWebsite:

- (IBAction) visitWebsite: (id)  sender

Extends class C4AppDelegate.

Definition at line 1 of file C4AppDelegate+MainMenuActions.mm.

185  :(id)sender
186 {
187  OpenURL("http://wiki.openclonk.org");
188 }
bool OpenURL(const char *szURL)
Definition: C4AppMac.mm:199

The documentation for this category was generated from the following files: