Icon Frame Images
Bug #1428597 reported by
Andre Novellino Gouvêa
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stratagus |
Won't Fix
|
Wishlist
|
cybermind |
Bug Description
Not a bug, but a wishlist item. It would be nice to be able to set an image as a frame icon with IconsShift, replacing the frame drawn by the engine if such an image is set.
Changed in stratagus: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
assignee: | nobody → cybermind (iddqd-mail) |
To post a comment you must log in.
I almost managed to implement this, but I can't get the game to remove the unpressed Frame when the pressed Frame is drawn. The code I'm using:
if (Preference. IconsShift && Preference. IconFrameG && Preference. PressedIconFram eG) { IconFrameG- >DrawClip( pos.x - 4, pos.y - 4);
if (!(flags & IconClicked)) {
Preference.
}
if (flags & IconActive) { // Code to make a border appear around the icon when the mouse hovers over it. DrawRectangle( ColorGray, pos.x - 4, pos.y - 4, 54, 46);
Video.
DrawUIButton(&s, flags, pos.x, pos.y, text, player);
}
if (flags & IconClicked) { // Shift the icon a bit to make it look like it's been pressed. DrawRectangle( ColorGreen, pos.x + 1, pos.y + 1, 46, 38); PressedIconFram eG->DrawClip( pos.x - 3, pos.y - 3); DrawRectangle( ColorGray, pos.x - 4, pos.y - 4, 54, 46); DrawRectangle( ColorGreen, pos.x, pos.y, 46, 38); IconsShift) {
DrawUIButton(&s, flags, pos.x + 1, pos.y + 1, text, player);
if (flags & IconSelected) {
Video.
}
Preference.
Video.
} else {
DrawUIButton(&s, flags, pos.x, pos.y, text, player);
if (flags & IconSelected) {
Video.
}
}
} else if (Preference.
[...]