Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ModInfoDlg.cpp
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: ModInfoDlg.cpp
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Mod Config Dialog Active Window class
13 */
14 
15 #include "MemDebug.h"
16 #include "ModInfoDlg.h"
17 #include "BaseScreen.h"
18 #include "ModConfig.h"
19 #include "ModInfo.h"
20 
21 #include "Game.h"
22 #include "DataLoader.h"
23 #include "Button.h"
24 #include "ListBox.h"
25 #include "ImageBox.h"
26 #include "Video.h"
27 #include "Keyboard.h"
28 #include "Mouse.h"
29 #include "ParseUtil.h"
30 
31 // +--------------------------------------------------------------------+
32 // DECLARE MAPPING FUNCTIONS:
33 
34 DEF_MAP_CLIENT(ModInfoDlg, OnAccept);
35 
36 // +--------------------------------------------------------------------+
37 
39 : FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr),
40 btn_accept(0), mod_info(0)
41 {
42  Init(def);
43 }
44 
46 {
47 }
48 
49 // +--------------------------------------------------------------------+
50 
51 void
53 {
54  btn_accept = (Button*) FindControl( 1);
55 
56  if (btn_accept)
58 
59  lbl_name = FindControl(101);
60  lbl_desc = FindControl(102);
61  lbl_copy = FindControl(103);
62 
63  img_logo = (ImageBox*) FindControl(200);
64 
65  if (img_logo) {
68  }
69 }
70 
71 // +--------------------------------------------------------------------+
72 
73 void
75 {
77 }
78 
79 // +--------------------------------------------------------------------+
80 
81 void
83 {
84  if (Keyboard::KeyDown(VK_RETURN)) {
86  OnAccept(0);
87  }
88 }
89 
90 // +--------------------------------------------------------------------+
91 
92 void
94 {
95  mod_info = info;
96 
97  if (mod_info) {
101 
102  if (img_logo && mod_info->LogoImage() && mod_info->LogoImage()->Width() > 32)
104  else if (img_logo)
106  }
107 }
108 
109 // +--------------------------------------------------------------------+
110 
111 void
113 {
114  manager->ShowModDlg();
115 }