Skip to content

Commit

Permalink
Refactor: Use Point2Raw to represent HUD widget origins
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Dec 19, 2011
1 parent 93774b0 commit c02cc3e
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 881 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/hu_automap.h
Expand Up @@ -146,7 +146,7 @@ void UIAutomap_Rebuild(uiwidget_t* obj);
void UIAutomap_ClearLists(uiwidget_t* obj);
void UIAutomap_Reset(uiwidget_t* obj);

void UIAutomap_Drawer(uiwidget_t* obj, int x, int y);
void UIAutomap_Drawer(uiwidget_t* obj, const Point2Raw* origin);

boolean UIAutomap_Open(uiwidget_t* obj, boolean yes, boolean fast);
void UIAutomap_Ticker(uiwidget_t* obj, timespan_t ticLength);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/hu_chat.h
Expand Up @@ -80,7 +80,7 @@ int UIChat_Responder(uiwidget_t* obj, event_t* ev);
int UIChat_CommandResponder(uiwidget_t* obj, menucommand_e cmd);

/// Draw this widget.
void UIChat_Drawer(uiwidget_t* obj, int x, int y);
void UIChat_Drawer(uiwidget_t* obj, const Point2Raw* origin);

/// Calculate the "physical" dimensions of this widget in fixed-pixels.
void UIChat_UpdateGeometry(uiwidget_t* obj);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/include/hu_lib.h
Expand Up @@ -761,7 +761,7 @@ typedef struct uiwidget_s {
float alpha;

void (*updateGeometry) (struct uiwidget_s* obj);
void (*drawer) (struct uiwidget_s* obj, int x, int y);
void (*drawer) (struct uiwidget_s* obj, const Point2Raw* origin);
void (*ticker) (struct uiwidget_s* obj, timespan_t ticLength);

void* typedata;
Expand Down Expand Up @@ -1003,7 +1003,7 @@ uiwidget_t* GUI_FindObjectById(uiwidgetid_t id);
uiwidget_t* GUI_MustFindObjectById(uiwidgetid_t id);

uiwidgetid_t GUI_CreateWidget(guiwidgettype_t type, int player, fontid_t fontId, float alpha,
void (*updateGeometry) (uiwidget_t* obj), void (*drawer) (uiwidget_t* obj, int x, int y),
void (*updateGeometry) (uiwidget_t* obj), void (*drawer) (uiwidget_t* obj, const Point2Raw* origin),
void (*ticker) (uiwidget_t* obj, timespan_t ticLength), void* typedata);

uiwidgetid_t GUI_CreateGroup(int player, int groupFlags, int alignFlags, int padding);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/include/hu_log.h
Expand Up @@ -84,7 +84,7 @@ typedef struct {
void UILog_Ticker(uiwidget_t* obj, timespan_t ticLength);

/// Draw this message log widget.
void UILog_Drawer(uiwidget_t* obj, int x, int y);
void UILog_Drawer(uiwidget_t* obj, const Point2Raw* origin);

/// Calculate the "physical" dimensions of this widget.
void UILog_UpdateGeometry(uiwidget_t* obj);
Expand Down

0 comments on commit c02cc3e

Please sign in to comment.