mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
Add hideCrosshair option to CinematicGui
This commit is contained in:
parent
485098d4fc
commit
ec27afe04b
@ -58,6 +58,8 @@ CC_VAR extern struct _GuiData {
|
||||
cc_bool AutoScaleChat;
|
||||
/* Whether the touch UI is currently being displayed. */
|
||||
cc_bool TouchUI;
|
||||
/* Whether the first person crosshair should be hidden. */
|
||||
cc_bool HideCrosshair;
|
||||
/* Whether the player hand/block model should be hidden. */
|
||||
cc_bool HideHand;
|
||||
/* Whether the hotbar should be hidden. */
|
||||
|
@ -1560,13 +1560,15 @@ static void CPE_LightingMode(cc_uint8* data) {
|
||||
}
|
||||
|
||||
static void CPE_CinematicGui(cc_uint8* data) {
|
||||
cc_bool hideHand = data[0];
|
||||
cc_bool hideHotbar = data[1];
|
||||
cc_uint16 barSize = Stream_GetU16_BE(data + 6);
|
||||
cc_bool hideCrosshair = data[0];
|
||||
cc_bool hideHand = data[1];
|
||||
cc_bool hideHotbar = data[2];
|
||||
cc_uint16 barSize = Stream_GetU16_BE(data + 7);
|
||||
|
||||
HeldBlockRenderer_Show = !hideHand && Options_GetBool(OPT_SHOW_BLOCK_IN_HAND, true);
|
||||
Gui.HideCrosshair = hideCrosshair;
|
||||
Gui.HideHotbar = hideHotbar;
|
||||
Gui.CinematicBarColor = PackedCol_Make(data[2], data[3], data[4], data[5]);
|
||||
Gui.CinematicBarColor = PackedCol_Make(data[3], data[4], data[5], data[6]);
|
||||
Gui.BarSize = (float)barSize / UInt16_MaxValue;
|
||||
}
|
||||
|
||||
@ -1613,7 +1615,7 @@ static void CPE_Reset(void) {
|
||||
Net_Set(OPCODE_PLUGIN_MESSAGE, CPE_PluginMessage, 66);
|
||||
Net_Set(OPCODE_ENTITY_TELEPORT_EXT, CPE_ExtEntityTeleport, 11);
|
||||
Net_Set(OPCODE_LIGHTING_MODE, CPE_LightingMode, 3);
|
||||
Net_Set(OPCODE_CINEMATIC_GUI, CPE_CinematicGui, 9);
|
||||
Net_Set(OPCODE_CINEMATIC_GUI, CPE_CinematicGui, 10);
|
||||
}
|
||||
|
||||
static cc_uint8* CPE_Tick(cc_uint8* data) {
|
||||
|
@ -407,7 +407,7 @@ static void HUDScreen_Render(void* screen, float delta) {
|
||||
Gfx_BindDynamicVb(s->vb);
|
||||
if (!Gui.HideHotbar) Widget_Render2(&s->hotbar, 12);
|
||||
|
||||
if (Gui.IconsTex && !tablist_active) {
|
||||
if (!Gui.HideCrosshair && Gui.IconsTex && !tablist_active) {
|
||||
Gfx_BindTexture(Gui.IconsTex);
|
||||
Gfx_BindDynamicVb(s->vb); /* Have to rebind for mobile right now... */
|
||||
Gfx_DrawVb_IndexedTris(4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user