mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-22 00:00:42 +00:00
Reformat to clang-format
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
#include <set>
|
||||
#include <wx/wxprec.h>
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
#include "gifs.h"
|
||||
#include <wx/animate.h>
|
||||
#include <wx/mstream.h>
|
||||
#include "gifs.h"
|
||||
#include <wx/wx.h>
|
||||
|
||||
#endif
|
||||
class MyApp : public wxApp {
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
class MyFrame : public wxFrame {
|
||||
public:
|
||||
MyFrame();
|
||||
|
||||
private:
|
||||
void OnHello(wxCommandEvent& event);
|
||||
void OnExit(wxCommandEvent& event);
|
||||
@@ -29,28 +30,28 @@ private:
|
||||
enum {
|
||||
ID_Hello = 1
|
||||
};
|
||||
wxSize MyFrame::FixedSize(370,400);
|
||||
wxSize MyFrame::FixedSize(370, 400);
|
||||
|
||||
bool MyApp::OnInit() {
|
||||
auto *frame = new MyFrame();
|
||||
auto* frame = new MyFrame();
|
||||
frame->Show(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
MyFrame::MyFrame()
|
||||
: wxFrame(nullptr, wxID_ANY, "BeamMP V3.0", wxDefaultPosition, FixedSize) {
|
||||
//SetMaxSize(FixedSize);
|
||||
//SetMinSize(FixedSize);
|
||||
: wxFrame(nullptr, wxID_ANY, "BeamMP V3.0", wxDefaultPosition, FixedSize) {
|
||||
// SetMaxSize(FixedSize);
|
||||
// SetMinSize(FixedSize);
|
||||
Center();
|
||||
|
||||
//27 35 35
|
||||
// 27 35 35
|
||||
|
||||
wxColour Colour(27,35,35,1);
|
||||
wxColour Colour(27, 35, 35, 1);
|
||||
SetBackgroundColour(Colour);
|
||||
|
||||
auto* menuFile = new wxMenu;
|
||||
menuFile->Append(ID_Hello, "&Hello...\tCtrl-H",
|
||||
"Help string shown in status bar for this menu item");
|
||||
"Help string shown in status bar for this menu item");
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(wxID_EXIT);
|
||||
auto* menuHelp = new wxMenu;
|
||||
@@ -60,13 +61,12 @@ MyFrame::MyFrame()
|
||||
menuBar->SetOwnBackgroundColour(Colour);
|
||||
menuBar->Append(menuFile, "&File");
|
||||
menuBar->Append(menuHelp, "&Help");
|
||||
//SetMenuBar(menuBar);
|
||||
// SetMenuBar(menuBar);
|
||||
|
||||
auto* m_ani = new wxAnimationCtrl(this, wxID_ANY);
|
||||
wxMemoryInputStream stream(gif::Logo, sizeof(gif::Logo));
|
||||
if (m_ani->Load(stream)) m_ani->Play();
|
||||
|
||||
|
||||
if (m_ani->Load(stream))
|
||||
m_ani->Play();
|
||||
|
||||
Bind(wxEVT_MENU, &MyFrame::OnHello, this, ID_Hello);
|
||||
Bind(wxEVT_MENU, &MyFrame::OnAbout, this, wxID_ABOUT);
|
||||
@@ -77,14 +77,13 @@ void MyFrame::OnExit(wxCommandEvent& event) {
|
||||
}
|
||||
void MyFrame::OnAbout(wxCommandEvent& event) {
|
||||
wxMessageBox("This is a wxWidgets Hello World example",
|
||||
"About Hello World", wxOK | wxICON_INFORMATION);
|
||||
"About Hello World", wxOK | wxICON_INFORMATION);
|
||||
}
|
||||
void MyFrame::OnHello(wxCommandEvent& event) {
|
||||
wxLogMessage("Hello world from wxWidgets!");
|
||||
}
|
||||
|
||||
|
||||
int GUIEntry (int argc, char *argv[]) {
|
||||
int GUIEntry(int argc, char* argv[]) {
|
||||
new MyApp();
|
||||
return wxEntry(argc, argv);
|
||||
}
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include "gifs.h"
|
||||
|
||||
const unsigned char gif::Logo[30427] =
|
||||
{
|
||||
const unsigned char gif::Logo[30427] = {
|
||||
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x80, 0x00, 0x80, 0x00, 0xf6, 0x00,
|
||||
0x00, 0x0f, 0x37, 0x57, 0x17, 0x27, 0x37, 0x17, 0x27, 0x3f, 0x0f, 0x37,
|
||||
0x5f, 0x00, 0x77, 0xef, 0x07, 0x4f, 0x8f, 0x17, 0x2f, 0x47, 0x0f, 0x3f,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
class gif{
|
||||
class gif {
|
||||
public:
|
||||
static const unsigned char Logo[30427];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user