| 137 | } |
| 138 | |
| 139 | void zUIFont_Update(zUIFont* ent, xScene*, F32) |
| 140 | { |
| 141 | _zUI* ui; |
| 142 | xBase* sendTo; |
| 143 | |
| 144 | if (ent->uiButton && gTrcPad[0].state == TRC_PadInserted) |
| 145 | { |
| 146 | if (ent->uiButton & XPAD_BUTTON_UP) |
| 147 | { |
| 148 | zEntEvent(ent, ent, eEventPadPressUp); |
| 149 | |
| 150 | if (ent->id == xStrHash("LD GAMESLOT 2") && !zSaveLoad_slotIsEmpty(0) && |
| 151 | zSaveLoad_slotIsEmpty(1) && !zSaveLoad_slotIsEmpty(2)) |
| 152 | { |
| 153 | zEntEvent(ent, ent, eEventUIUnselect); |
| 154 | |
| 155 | sendTo = zSceneFindObject(xStrHash("LD GAMESLOT 0")); |
| 156 | |
| 157 | zEntEvent(sendTo, eEventUISelect); |
| 158 | } |
| 159 | } |
| 160 | else if (ent->uiButton & XPAD_BUTTON_DOWN) |
| 161 | { |
| 162 | zEntEvent(ent, ent, eEventPadPressDown); |
| 163 | |
| 164 | if (ent->id == xStrHash("LD GAMESLOT 0") && !zSaveLoad_slotIsEmpty(0) && |
| 165 | zSaveLoad_slotIsEmpty(1) && !zSaveLoad_slotIsEmpty(2)) |
| 166 | { |
| 167 | zEntEvent(ent, ent, eEventUIUnselect); |
| 168 | |
| 169 | sendTo = zSceneFindObject(xStrHash("LD GAMESLOT 2")); |
| 170 | |
| 171 | zEntEvent(sendTo, eEventUISelect); |
| 172 | } |
| 173 | } |
| 174 | else if (ent->uiButton & XPAD_BUTTON_LEFT) |
| 175 | { |
| 176 | zEntEvent(ent, ent, eEventPadPressLeft); |
| 177 | } |
| 178 | else if (ent->uiButton & XPAD_BUTTON_RIGHT) |
| 179 | { |
| 180 | zEntEvent(ent, ent, eEventPadPressRight); |
| 181 | } |
| 182 | else if (ent->uiButton & XPAD_BUTTON_START) |
| 183 | { |
| 184 | zEntEvent(ent, ent, eEventPadPressStart); |
| 185 | } |
| 186 | else if (ent->uiButton & XPAD_BUTTON_SELECT) |
| 187 | { |
| 188 | zEntEvent(ent, ent, eEventPadPressSelect); |
| 189 | } |
| 190 | else if (ent->uiButton & XPAD_BUTTON_R1) |
| 191 | { |
| 192 | zEntEvent(ent, ent, eEventPadPressR1); |
| 193 | ent->uiButton = XPAD_BUTTON_R1; |
| 194 | } |
| 195 | else if (ent->uiButton & XPAD_BUTTON_R2) |
| 196 | { |
nothing calls this directly
no test coverage detected