summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-16 16:48:54 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-16 16:48:54 +0000
commit304c79eeb6785efc39576cc89985787c1faea485 (patch)
treebc23afb81e2a8a30fe31cf1b4b47b839a4293a0b /src/gui
parentb4607a6c80a5ab7b09a79baa7b9f9d9c7aeab6ef (diff)
downloadmana-304c79eeb6785efc39576cc89985787c1faea485.tar.gz
mana-304c79eeb6785efc39576cc89985787c1faea485.tar.bz2
mana-304c79eeb6785efc39576cc89985787c1faea485.tar.xz
mana-304c79eeb6785efc39576cc89985787c1faea485.zip
Removed checkbox and dialog stuff.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/checkbox.cpp3
-rw-r--r--src/gui/gui.cpp74
-rw-r--r--src/gui/gui.h14
3 files changed, 1 insertions, 90 deletions
diff --git a/src/gui/checkbox.cpp b/src/gui/checkbox.cpp
index ed0bb841..f8a9a4ab 100644
--- a/src/gui/checkbox.cpp
+++ b/src/gui/checkbox.cpp
@@ -32,7 +32,6 @@ CheckBox::CheckBox(const std::string& caption, bool marked):
checkBoxChecked = checkBox->getSubImage(9, 0, 9, 10);
checkBoxDisabled = checkBox->getSubImage(18, 0, 9, 10);
checkBoxDisabledChecked = checkBox->getSubImage(27, 0, 9, 10);
-
}
void CheckBox::drawBox(gcn::Graphics* graphics) {
@@ -55,7 +54,7 @@ void CheckBox::drawBox(gcn::Graphics* graphics) {
x += 2;
y += 2;
- if(box != NULL) {
+ if (box != NULL) {
box->draw(buffer, x, y);
}
}
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 451c6fac..8799016f 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -286,40 +286,6 @@ void loadSliderSkin() {
gui_skin.slider.hGrip = create_sub_bitmap(gui__repository[GUI_BMP_OFS_SLIDER], x, y, w, h);
}
-void loadCheckboxSkin() {
- int x, y, w,h;
- char **tokens;
- int tokenCount;
-
- gui__repository[GUI_BMP_OFS_CHECKBOX] = (BITMAP *)gui_gfx[4].dat;
-
-
- tokens = get_config_argv("checkbox", "normal", &tokenCount);
- x = atoi(tokens[0]); y = atoi(tokens[1]);
- w = atoi(tokens[2]); h = atoi(tokens[3]);
- gui_skin.checkbox.normal = create_sub_bitmap(gui__repository[GUI_BMP_OFS_CHECKBOX], x , y, w, h);
-
- tokens = get_config_argv("checkbox", "checked", &tokenCount);
- x = atoi(tokens[0]); y = atoi(tokens[1]);
- w = atoi(tokens[2]); h = atoi(tokens[3]);
- gui_skin.checkbox.checked = create_sub_bitmap(gui__repository[GUI_BMP_OFS_CHECKBOX], x , y, w, h);
-
- tokens = get_config_argv("checkbox", "disabled", &tokenCount);
- x = atoi(tokens[0]); y = atoi(tokens[1]);
- w = atoi(tokens[2]); h = atoi(tokens[3]);
- gui_skin.checkbox.disabled = create_sub_bitmap(gui__repository[GUI_BMP_OFS_CHECKBOX], x , y, w, h);
-
- tokens = get_config_argv("checkbox", "disabled_check", &tokenCount);
- x = atoi(tokens[0]); y = atoi(tokens[1]);
- w = atoi(tokens[2]); h = atoi(tokens[3]);
- gui_skin.checkbox.disabled_checked = create_sub_bitmap(gui__repository[GUI_BMP_OFS_CHECKBOX], x , y, w, h);
-
- tokens = get_config_argv("button", "textcol_norm", &tokenCount);
- gui_skin.checkbox.textcolor[0] = makecol(atoi(tokens[0]),atoi(tokens[1]),atoi(tokens[2]));
- tokens = get_config_argv("button", "textcol_disabled", &tokenCount);
- gui_skin.checkbox.textcolor[1] = makecol(atoi(tokens[0]),atoi(tokens[1]),atoi(tokens[2]));
-}
-
void loadTextboxSkin() {
char **tokens;
int tokenCount;
@@ -420,38 +386,6 @@ void loadListboxSkin() {
}
-void loadDialogSkin() {
- char **tokens;
- int tokenCount;
- int gridx[4];
- int gridy[4];
- int a = 0;
- int x, y;
-
- tokens = get_config_argv("dialog", "gridx", &tokenCount);
- for (a = 0; a < 4; a++) {
- gridx[a] = atoi(tokens[a]);
- }
- tokens = get_config_argv("dialog", "gridy", &tokenCount);
- for (a = 0; a < 4; a++) {
- gridy[a] = atoi(tokens[a]);
- }
-
- gui__repository[GUI_BMP_OFS_DIALOG] = (BITMAP *)gui_gfx[5].dat;
-
- a = 0;
- for (y = 0; y < 3; y++) {
- for (x = 0; x < 3; x++) {
- gui_skin.dialog.bg.grid[a] = create_sub_bitmap(
- gui__repository[GUI_BMP_OFS_DIALOG],
- gridx[x] , gridy[y],
- gridx[x+1]-gridx[x]+1, gridy[y+1]-gridy[y]+1
- );
- a++;
- }
- }
-}
-
void draw_skinned_rect(BITMAP*dst, LexSkinnedRect *skin,
int x, int y, int w, int h)
{
@@ -497,10 +431,8 @@ int gui_load_skin(const char* skinname) {
gui_gfx = load_datafile(get_config_string("skin", "gfx", 0));
loadButtonSkin();
loadSliderSkin();
- loadCheckboxSkin();
loadTextboxSkin();
loadListboxSkin();
- loadDialogSkin();
pop_config_state();
set_mouse_sprite((BITMAP *)gui_gfx[7].dat);
@@ -531,12 +463,6 @@ void gui_shutdown(void) {
destroy_bitmap(gui_skin.slider.hGrip);
destroy_bitmap(gui_skin.slider.vGrip);
- /* Checkbox */
- destroy_bitmap(gui_skin.checkbox.normal);
- destroy_bitmap(gui_skin.checkbox.checked);
- destroy_bitmap(gui_skin.checkbox.disabled);
- destroy_bitmap(gui_skin.checkbox.disabled_checked);
-
for (a = 0; a < GUI_BMP_COUNT; a++) {
destroy_bitmap(gui__repository[a]);
}
diff --git a/src/gui/gui.h b/src/gui/gui.h
index b4abaad8..427ffaee 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -106,14 +106,6 @@ typedef struct {
} LexSlider;
typedef struct {
- BITMAP *normal;
- BITMAP *checked;
- BITMAP *disabled;
- BITMAP *disabled_checked;
- int textcolor[2];
-} LexCheckbox;
-
-typedef struct {
LexSkinnedRect bg;
int textcolor[2];
} LexTextbox;
@@ -125,16 +117,10 @@ typedef struct {
} LexListbox;
typedef struct {
- LexSkinnedRect bg;
-} LexDialog;
-
-typedef struct {
LexButton button;
LexSlider slider;
- LexCheckbox checkbox;
LexTextbox textbox;
LexListbox listbox;
- LexDialog dialog;
} LexSkin;
extern LexSkin gui_skin;