Crossfire Client, Trunk
|
#include "client.h"
#include <gtk/gtk.h>
#include "image.h"
#include "metaserver.h"
#include "main.h"
#include "gtk2proto.h"
Go to the source code of this file.
Enumerations | |
enum | { LIST_NAME, LIST_LEVEL, LIST_EXP, LIST_NEXTLEVEL } |
Functions | |
void | on_skill_close_clicked (GtkButton *button, gpointer user_data) |
void | on_skill_ready_clicked (GtkButton *button, gpointer user_data) |
void | on_skill_treeview_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) |
void | on_skill_use_clicked (GtkButton *button, gpointer user_data) |
void | on_skills_activate (GtkMenuItem *menuitem, gpointer user_data) |
static gboolean | skill_selection_func (GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer userdata) |
void | trigger_skill (GtkTreeIter iter, GtkTreeModel *model, int use_skill) |
void | update_skill_information (void) |
Variables | |
static int | has_init = 0 |
static GtkWidget * | skill_ready |
static GtkTreeSelection * | skill_selection |
static GtkListStore * | skill_store |
static GtkWidget * | skill_treeview |
static GtkWidget * | skill_use |
static GtkWidget * | skill_window |
Handles The callbacks for the skill window.
Definition in file skills.c.
anonymous enum |
void on_skill_close_clicked | ( | GtkButton * | button, |
gpointer | user_data | ||
) |
button | |
user_data |
Definition at line 267 of file skills.c.
References skill_window.
Referenced by on_skills_activate().
void on_skill_ready_clicked | ( | GtkButton * | button, |
gpointer | user_data | ||
) |
button | |
user_data |
Definition at line 238 of file skills.c.
References skill_selection, skill_window, and trigger_skill().
Referenced by on_skills_activate().
void on_skill_treeview_row_activated | ( | GtkTreeView * | treeview, |
GtkTreePath * | path, | ||
GtkTreeViewColumn * | column, | ||
gpointer | user_data | ||
) |
treeview | |
path | |
column | |
user_data |
Definition at line 221 of file skills.c.
References skill_window, and trigger_skill().
Referenced by on_skills_activate().
void on_skill_use_clicked | ( | GtkButton * | button, |
gpointer | user_data | ||
) |
button | |
user_data |
Definition at line 253 of file skills.c.
References skill_selection, and trigger_skill().
Referenced by on_skills_activate().
void on_skills_activate | ( | GtkMenuItem * | menuitem, |
gpointer | user_data | ||
) |
menuitem | |
user_data |
Definition at line 106 of file skills.c.
References dialog_xml, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, on_skill_close_clicked(), on_skill_ready_clicked(), on_skill_treeview_row_activated(), on_skill_use_clicked(), skill_ready, skill_selection, skill_selection_func(), skill_store, skill_treeview, skill_use, skill_window, and update_skill_information().
Referenced by init_menu_items().
|
static |
Used if a user just single clicks on an entry - at which point, we enable the cast & invoke buttons.
selection | |
model | |
path | |
path_currently_selected | |
userdata |
Definition at line 46 of file skills.c.
References skill_ready, and skill_use.
Referenced by on_skills_activate().
void trigger_skill | ( | GtkTreeIter | iter, |
GtkTreeModel * | model, | ||
int | use_skill | ||
) |
This is where we actually do something with the skill. model and iter tell us which skill we want to trigger, use_skill is 1 to use the skill, 0 to ready it.
iter | |
model | |
use_skill |
Definition at line 197 of file skills.c.
References LIST_NAME, LOG(), LOG_ERROR, MAX_BUF, send_command(), and use_skill().
Referenced by on_skill_ready_clicked(), on_skill_treeview_row_activated(), and on_skill_use_clicked().
void update_skill_information | ( | void | ) |
Called whenever the skill window is opened or a stats packet is received. If the skills window has been created and is currently visible, it rebuilds the list store otherwise nothing happens, because it will be called again next time the window is opened anyway.
Definition at line 62 of file skills.c.
References cpl, dialog_xml, exp_table, exp_table_max, has_init, LIST_EXP, LIST_LEVEL, LIST_NAME, LIST_NEXTLEVEL, MAX_BUF, MAX_SKILL, Stat_struct::skill_exp, Stat_struct::skill_level, skill_mapping, skill_store, Player_Struct::stats, and NameMapping::value.
Referenced by draw_stats(), and on_skills_activate().
|
static |
Definition at line 34 of file skills.c.
Referenced by on_skills_activate(), and update_skill_information().
|
static |
Definition at line 28 of file skills.c.
Referenced by on_skills_activate(), and skill_selection_func().
|
static |
Definition at line 30 of file skills.c.
Referenced by on_skill_ready_clicked(), on_skill_use_clicked(), and on_skills_activate().
|
static |
Definition at line 29 of file skills.c.
Referenced by on_skills_activate(), and update_skill_information().
|
static |
Definition at line 28 of file skills.c.
Referenced by on_skills_activate().
|
static |
Definition at line 28 of file skills.c.
Referenced by on_skills_activate(), and skill_selection_func().
|
static |
Definition at line 28 of file skills.c.
Referenced by on_skill_close_clicked(), on_skill_ready_clicked(), on_skill_treeview_row_activated(), and on_skills_activate().