Пример #1
0
bool mmAboutDialog::Create(wxWindow* parent
    , wxWindowID id
    , const wxString& caption
    , const wxPoint& pos
    , const wxSize& size
    , long style
	, const int& TabToOpen
    )
{
    SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);

    bool ok = wxDialog::Create(parent, id, caption, pos, size, style);

    if (ok)
    {
		CreateControls(TabToOpen);
        InitControls();
        GetSizer()->Fit(this);
        GetSizer()->SetSizeHints(this);
        SetIcon(mmex::getProgramIcon());
        Centre();
    }

    return ok;
}
void SceneEditorScreenMain::LoadResources()
{
    new HintManager();
    new PropertyControlCreator();
    
    ControlsFactory::CustomizeScreenBack(this);

    font12 = ControlsFactory::GetFont12();
	font12Color = ControlsFactory::GetColorLight();

    helpDialog = new HelpDialog();
    
    focusedControl = NULL;

    InitializeNodeDialogs();

    Rect fullRect = GetRect();
    settingsDialog = new SettingsDialog(fullRect, this);
    textureTrianglesDialog = new TextureTrianglesDialog();
    materialEditor = new MaterialEditor();
    
    InitControls();
    
    InitializeBodyList();
    SetupAnimation();
}
Пример #3
0
INT_PTR ACheatInfoDlg::OnInitDialog(HWND hWnd,HWND hWndFocus,LPARAM InitParam)
{
	m_hWnd = hWnd;

	m_editName->AttachCtrl(this,IDC_CHEAT_CHEAT_NAME);

	m_CheatsList->AttachCtrl(this,IDC_CHEAT_CHEATSLIST);

	m_editName->SubClass();

	InitControls();

	hThisDlg = hWnd;
	ThisDlg = this;

	m_layout.Add(m_editName->GetHwnd(),hWnd,LayoutItem::Align(LayoutItem::kLEFT|LayoutItem::kTOP|LayoutItem::kRisizeHorz));
	m_layout.Add(m_CheatsList->GetHwnd(),hWnd,LayoutItem::Align(LayoutItem::kLEFT|LayoutItem::kTOP|LayoutItem::kRisizeHorz|LayoutItem::kRisizeVert));
	m_layout.Add(IDC_CHEAT_CHEATINFO,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));
	m_layout.Add(IDC_CHEAT_EXECLUA,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));
	m_layout.Add(IDC_CHEAT_CUSTOM,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));
	m_layout.Add(IDC_CHEAT_EDITSCRIPT,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));
	m_layout.Add(IDC_CHEAT_ADDLUA,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));
	m_layout.Add(IDC_CHEAT_DELETELUA,hWnd,LayoutItem::Align(LayoutItem::kRIGHT|LayoutItem::kTOP));

	return TRUE;
}
Пример #4
0
c_PreferencesDlg::c_PreferencesDlg()
{
    set_title(_("Preferences"));
    InitControls();
    signal_response().connect(sigc::mem_fun(*this, &c_PreferencesDlg::OnResponse));
    Utils::RestorePosSize(Configuration::PreferencesDlgPosSize, *this);
}
Пример #5
0
BOOL InitApplication( HINSTANCE hInstance )
{
	BOOL bSuccess = TRUE;
	WNDCLASS wndClass = { 0 };

	wndClass.style = 0;
	wndClass.lpfnWndProc = MainWndProc;
	wndClass.cbClsExtra = 0;
	wndClass.cbWndExtra = 0;
	wndClass.hInstance = hInstance;
	wndClass.hIcon = LoadIcon( hInstance, TEXT( "BlackLeaf" ) );
	wndClass.hCursor = LoadCursor( NULL, IDC_ARROW );
	wndClass.hbrBackground = (HBRUSH)( COLOR_WINDOW  );
	wndClass.lpszMenuName = TEXT( "MainMenu" );
	wndClass.lpszClassName = TEXT( APP_CLASS_NMAE );

	if ( !RegisterClass( &wndClass ) ) 
	{
		MessageBox( NULL, TEXT( "RegisterClass failed!" ), TEXT( APP_CLASS_NMAE ), MB_ICONERROR );
		bSuccess = FALSE;
	}

	if ( !InitControls( hInstance ) )
	{
		bSuccess = FALSE;
	}

	return bSuccess;
}
Пример #6
0
void HelloGUI::Start()
{
    // Execute base class startup
    Sample::Start();

    // Enable OS cursor
    GetSubsystem<Input>()->SetMouseVisible(true);

    // Load XML file containing default UI style sheet
    auto* cache = GetSubsystem<ResourceCache>();
    auto* style = cache->GetResource<XMLFile>("UI/DefaultStyle.xml");

    // Set the loaded style as default style
    uiRoot_->SetDefaultStyle(style);

    // Initialize Window
    InitWindow();

    // Create and add some controls to the Window
    InitControls();

    // Create a draggable Fish
    CreateDraggableFish();

    // Set the mouse mode to use in the sample
    Sample::InitMouseMode(MM_FREE);
}
bool HighscoreScreen::init()
{
    if (!Layer::init())
    {
        return false;
    }

    _rootNode = CSLoader::createNode("Screens/HighscoreScreen.csb");
    addChild(_rootNode);
    this->scheduleUpdate();

    _myDictionary = __Dictionary::create();

    ReadHighscore();

    if (_scores[1]->length() == 0)
    {
        WriteDefaultHighscore();
        ReadHighscore();
    }

    //SPRITES
    InitSprites();
    //Animated Santa Sprite
    InitAnimation();
    //LABELS
    InitLabels();
    //TOUCHES
    InitControls();
    //BUTTONS
    InitButtons();

    return true;
}
Пример #8
0
UIScrollBar::UIScrollBar(const Rect &rect, eScrollOrientation requiredOrientation, bool rectInAbsoluteCoordinates/* = false*/)
:	UIControl(rect, rectInAbsoluteCoordinates)
,	delegate(NULL)
,	orientation(requiredOrientation)
,   resizeSliderProportionally(true)
{
	InitControls(rect);
}
Пример #9
0
void UIScrollBar::LoadFromYamlNodeCompleted()
{
	slider = SafeRetain(FindByName(UISCROLLBAR_SLIDER_NAME));
	if (!slider)
	{
		InitControls();
	}
}
Пример #10
0
void ClassListDialog::OnShowRecursiveInfoCheckbox( wxCommandEvent& WXUNUSED(event) )
{
    m_pRawListBox->Clear();
    m_pParentTreeCtrl->DeleteAllItems();
    m_pSizeListBox->Clear();

    InitControls();
}
Пример #11
0
BOOL CControlDlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	InitControls();

	return TRUE;
}
Пример #12
0
LRESULT CDlgOne::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) 
{
    CenterWindow();
    InitControls();

	MessageBox(_T("Rising"));

    return 1;
}
Пример #13
0
/**
 * @brief WM_INITDIALOG handler of simplified dialog.
 * @param hwnd - window handle.
 * @param hwndFocus - system-defined focus window.
 * @param lParam - user-defined parameter.
 * @return true to setup focus to system-defined control.
 */
static BOOL SimpleDlg_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
	lParam; hwndFocus;

	InitControls(hwnd);
	InitIntro(hwnd, g_hlURL);
	InitAbout(hwnd);

	return FALSE;
}
Пример #14
0
D2DMessageBox::D2DMessageBox(D2DView* view, D2DSubView* parent, ED2D_MB_TYPE type) : D2DDialog(view, parent)
{
	Callback = NULL;
	CallbackUserData = NULL;

	OkButton = NULL;
	YesButton = NULL;
	NoButton = NULL;

	InitControls(type);
}
Пример #15
0
ConnectToDialog::ConnectToDialog( wxWindow *parent, wxWindowID id,
                                 const wxString& title,
                                 const wxPoint& pos /*= wxDefaultPosition*/,
                                 const wxSize& size /*= wxDefaultSize*/,
                                 long style /*= wxDEFAULT_DIALOG_STYLE*/,
                                 const wxString& name /*= wxDialogNameStr*/ )
 : wxDialog(parent, id, title, pos, size, style, name)
 , m_ipAddress("127.0.0.1"), m_port(12321)
{
    InitControls();
    LoadHistoryValue();
}
Пример #16
0
Win360GamepadController::Win360GamepadController(const WinDeviceDesc& desc) :
WinInputController(desc), index(desc._xInputIndex) {
	currBuffer = false;
	enabled = true;
	changeCount = 0;
	pollTask.SetDevice(this);
	thumbDeadZone[0] = XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE;
	thumbDeadZone[1] = XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE;
	triggerDeadZone = XINPUT_GAMEPAD_TRIGGER_THRESHOLD;

	InitControls();
}
Пример #17
0
c_SelectPointsDlg::c_SelectPointsDlg(const libskry::c_Image &img,
                                     const std::vector<struct SKRY_point> &points,
                                     const std::vector<struct SKRY_point> &automaticPoints)
{
    m_Img = img;
    m_Points = points;
    m_AutomaticPoints = automaticPoints;
    InitControls(!automaticPoints.empty());

    m_ImgView.SetImage(m_Img);

    set_response_sensitive(Gtk::ResponseType::RESPONSE_OK, !m_Points.empty());
}
Пример #18
0
LRESULT CEnvironmentSetDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	CXMLDialog<CEnvironmentSetDlg>::OnInitDialog(uMsg, wParam, lParam, bHandled);
	::MoveWindow(m_hWnd,0, 143,1280, 881, FALSE);

	InitControls();





	return TRUE;
}
Пример #19
0
D2DContentDownloadDialog::D2DContentDownloadDialog(D2DView* view, D2DSubView* parent, EDownloadType type, const std::list<DownloadJob>& jobs ) : D2DDialog(view, parent)
{
	Downloader = NULL;
	Zip = NULL;

	NextJobs = jobs;

	DownloadType = type;
	UnzipNumFiles = 0;
	UnzipFile = 0;
	InitControls();
	RunNextJob();
}
Пример #20
0
BOOL CBalloonTip::Initialization()
{
	SetSkinImage(m_nBK);
	SetSkinCorner(CRect(5,30,5,5));
	InitIconImage();
	InitControls();
	SetTimer(GetHWND(),ID_TIMER_START_SHOW,ID_ELAPSE_SHOW,NULL);
	if (m_nTitleID!=0)
	{
		SetTitleIcon(m_nTitleID);
	}
	SetForegroundWindow(GetHWND());
	return TRUE;
}
Пример #21
0
	MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent),
		ListItemRightClickEventPending (false),
		SelectedItemIndex (-1),
		SelectedSlotNumber (0),
		ShowRequestFifo (-1)
	{
		wxBusyCursor busy;

		SetName (Application::GetName());
		SetTitle (Application::GetName());
		SetIcon (Resources::GetTrueCrypt64Icon());

#if defined(TC_UNIX) && !defined(TC_MACOSX)
		try
		{
			string fifoPath = GetShowRequestFifoPath();

			remove (fifoPath.c_str());
			throw_sys_if (mkfifo (fifoPath.c_str(), S_IRUSR | S_IWUSR) == -1);

			ShowRequestFifo = open (fifoPath.c_str(), O_RDONLY | O_NONBLOCK);
			throw_sys_if (ShowRequestFifo == -1);
		}
		catch (...)
		{
#ifdef DEBUG
			throw;
#endif
		}
#endif

		InitControls();
		InitPreferences();
		InitTaskBarIcon();
		InitEvents();
		InitMessageFilter();

		if (!GetPreferences().SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized())
		{
			try
			{
				Gui->InitSecurityTokenLibrary();
			}
			catch (exception &e)
			{
				Gui->ShowError (e);
			}
		}
	}
Пример #22
0
void CMServerView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();

	CRect rcClient;
	GetClientRect(&rcClient);
	GetParentFrame()->RecalcLayout();
	// 스크롤 크기를 뷰의 크기로 맞추어 줌.
	SetScaleToFitSize(rcClient.Size());

	Init();
	InitControls();

	g_pMainDlg = this;
}
Пример #23
0
BOOL CBetaPatchClientDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

#if __CURRENT_LANG == LANG_KOR
#ifdef __LINK_PORTAL
	//무인자 일 경우 홈페이지로 연결
/*	CString strCmdLine;
	strCmdLine.Format("%s", AfxGetApp()->m_lpCmdLine);
	if(strCmdLine.GetLength() == 0 || strCmdLine == "1")
	{
		::ShellExecute(NULL, "open", LOGIN_LINK, NULL, ".", SW_SHOWNORMAL);
		OnExit();
		return FALSE;
	}
*/
//	else
//		AfxMessageBox( strCmdLine );
#endif //__LINK_PORTAL
#endif // LANG_KOR

	SetWindowText("FLYFF");

	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	if( InitControls() == FALSE )
		return TRUE;

	m_pHttpDownload->SetServer( PATCHSEVER_URL );

#if __CURRENT_LANG == LANG_FRA
	m_Static_CurrentState.SetText( _S(IDS_STR_FRA_SEARCHLIST) );
#else
	m_Static_CurrentState.SetText("Searching For Patch List");
#endif
	SetPatchVersionString( PATCH_VERSION );
	
	g_PatchManager.EnqueueFILE( "\\list.txt", false, 0, NULL );  
	m_nState = STATE_WAIT_PATCHLISTFILE;
	m_pHttpDownload->BeginDownload( &g_PatchManager );

//  for test
//	m_nState = STATE_WAIT_PATCHLISTFILE;
//	PostMessage( WM_HTTPDOWNLOAD_THREAD_FINISHED );
	return TRUE;	  // return TRUE  unless you set the focus to a control
}
Пример #24
0
D2DDialog::D2DDialog(D2DView* view, D2DSubView* parent) : D2DSubView(view, parent)
{
	DraggingWindow = false;

	MainPanel = new SV_Panel(view, this);
	MainPanel->SetRect(ViewRect);
	MainPanel->SetGlossyOutline(true);
	MainPanel->SetPanelShadow(true, 40.0f);

	Header = new SV_Label(view, MainPanel);
	Header->SetPositionAndSize(D2D1::Point2F(0,0), D2D1::SizeF(GetSize().width, DIALOG_HEADER_SIZE));
	Header->SetCaption("Dialog");
	Header->SetDrawBackground(true);
	Header->SetHorizAlignment(DWRITE_TEXT_ALIGNMENT_CENTER);
	Header->SetVertAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER);

	InitControls();
}
Пример #25
0
MRESULT EXPENTRY wpDragInfo( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
{
    switch( msg )
    {
        case WM_INITDLG:
            InitControls( hwnd );
            return (MRESULT) TRUE;   // Return TRUE to retain any changed focus

        case WM_COMMAND:
            if( wmCommand( hwnd, SHORT1FROMMP( mp1 ) ) )
                return 0;
            else
                break;

        case WM_SETFOCUS:
            if( mp2 )
                WinPostMsg( hwnd, UM_SET_FOCUS, NULL, NULL );
            break;

        case UM_SET_FOCUS:
        {
            PPAGEDATA pPageData = WinQueryWindowPtr( hwnd, QWL_USER );
            if( pPageData )
                WinSetFocus( HWND_DESKTOP,
                             WinWindowFromID( hwnd, pPageData->idFocus ) );
            return 0;
        }

        case WM_CONTROL:
            wmControl( hwnd, SHORT1FROMMP( mp1 ), SHORT2FROMMP( mp1 ) );
            return 0;

        case UM_GET_FOCUS_ID:
            return (MRESULT) CB_OPERATION;

        case UM_DUMP_DLGINFO:
            DumpDlgInfo( hwnd );
            break;
    }

    return WinDefDlgProc( hwnd, msg, mp1, mp2 );
}
Пример #26
0
void LunaticInit(MGLDraw *mgl)
{
	gamemgl = mgl;

	logFile = AppdataOpen("loonylog.txt", "wt");
	InitCosSin();
	InitDisplay(gamemgl);
	InitSound();
	InitMonsters();
	InitTiles(mgl);
	InitItems();
	InitInterface();
	LoadOptions();
	MusicInit();
	mgl->SetLastKey(0);
	MGL_srand(timeGetTime());
	InitControls();
	InitPlayer(INIT_GAME, 0, 0);
	msgFromOtherModules = 0;
}
Пример #27
0
bool GameScreen::init()
{
	if (!Layer::init())
	{
		return false;
	}

	_rootNode = CSLoader::createNode("Screens/MainGame.csb");
	addChild(_rootNode);
	this->scheduleUpdate();

	_platform = (Platform*)_rootNode->getChildByName("platform");
	_platform = Platform::create();
	this->addChild(_platform);

	_powerUp = (PowerUp*)_rootNode->getChildByName("powerup");
	_powerUp = PowerUp::create();
	this->addChild(_powerUp);

	_menuBar = (MenuBar*)_rootNode->getChildByName("menuBar");
	_menuBar = MenuBar::create();
	this->addChild(_menuBar);

	//SPRITES
	InitSprites();
	//Animated Santa Sprite
	InitAnimation();
	//LABELS
	InitLabels();
	//TOUCHES
	InitControls();
	//BUTTONS
	InitButtons();


	// Game is not live until the start button is pressed.
	GameManager::sharedGameManager()->isGameLive = false;
	GameState();

	return true;
}
Пример #28
0
MidiPlayerWindow::MidiPlayerWindow()
    : BWindow(BRect(0, 0, 1, 1), B_TRANSLATE("MidiPlayer"), B_TITLED_WINDOW,
              B_ASYNCHRONOUS_CONTROLS | B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
    playing = false;
    scopeEnabled = true;
    reverb = B_REVERB_BALLROOM;
    volume = 75;
    windowX = -1;
    windowY = -1;
    inputId = -1;
    instrLoaded = false;

    be_synth->SetSamplingRate(44100);

    bridge = new SynthBridge;
    //bridge->Register();

    CreateViews();
    LoadSettings();
    InitControls();
}
Пример #29
0
/******************** core functions **********************/
void Controller::Init()
{
	/** Timers: set both timers to 0 **/
	m_dElapsedTime = 0.0;
	m_dAccumulatedTime_thread1 = 0.0;
	m_dAccumulatedTime_thread2 = 0.0;

	//mouse button
	mouseLeftButton = glfwGetMouseButton(glfwGetCurrentContext(), GLFW_MOUSE_BUTTON_LEFT);
	mouseRightButton = glfwGetMouseButton(glfwGetCurrentContext(), GLFW_MOUSE_BUTTON_RIGHT);

	//hide the cursor
	glfwSetInputMode(currentView->getWindow(), GLFW_CURSOR, GLFW_CURSOR_NORMAL);

	//controls
	InitControls();

	/*** Create views and models ***/
/********************** Models **********************/
	Gameplay = new Model_Gameplay;
	Level_Editor = new Model_Level_Editor;	
	mainMenu = new Model_MainMenu;

/********************** Views **********************/
	view_MainMenu = new View_Main_Menu(mainMenu, 975, 650, View::TWO_D);
	view_LevelEditor = new View_Level_Editor(Level_Editor, 975, 650, View::TWO_D);
	view_3D_Game = new View_3D_Game(Gameplay, 975, 650, View::TWO_D);

/********************** Initialize **********************/
	//init view
	currentView = view_3D_Game;
	InitCurrentView();

	//set model
	currentModel = Gameplay;
	InitCurrentModel();
}
Пример #30
0
EditorBodyControl::EditorBodyControl(const Rect & rect)
    :   UIControl(rect)
	, beastManager(0)
	, originalNode(0)
	, modifiedNode(0)
{
    currentViewportType = ResourceEditor::VIEWPORT_DEFAULT;
    
    scene = NULL;
    
    landscapeRulerTool = NULL;
	
    ControlsFactory::CusomizeBottomLevelControl(this);

    sceneGraph = new SceneGraph(this, rect);
    currentGraph = sceneGraph;

    InitControls();

    scene3dView->SetDebugDraw(true);
    scene3dView->SetInputEnabled(false);
    AddControl(scene3dView);

	CreateModificationPanel();
    CreateLandscapeEditor();

    scene = NULL;
    cameraController = NULL;

	modificationMode = ResourceEditor::MODIFY_NONE;
	landscapeRelative = false;
    
    propertyShowState = EPSS_ONSCREEN;

    AddControl(currentGraph->GetPropertyPanel());
}