Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m_Mapping[KS_CHAT_RESIZEUP] = KeyboardMapping(INPUTMAP_KEYBOARD, kbsEquals, "$HUD_Chat_ResizeUp", false);
- m_Mapping[KS_CHAT_RESIZEDOWN] = KeyboardMapping(INPUTMAP_KEYBOARD, kbsMinus, "$HUD_Chat_ResizeDown", false);
- KS_CHAT_RESIZEUP,
- KS_CHAT_RESIZEDOWN,
- if((Keyboard->WasPressed(kbsEsc)) && hudStore->isActive())
- hudStore->Deactivate();
- bool showAttachment = InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_SHOW_ATTACHMENTS);
- bool chatResizeUp = InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_CHAT_RESIZEUP);
- if(chatResizeUp)
- {
- hudMain->chatResizeUp();
- }
- bool chatResizeDown = InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_CHAT_RESIZEDOWN);
- if(chatResizeDown)
- {
- hudMain->chatResizeDown();
- }
- if(r_render_in_game_HUD->GetBool())
- {
- R3DPROFILE_FUNCTION("gfxHUD.UpdateAndDraw");
- #ifndef FINAL_BUILD
- gfxHUD.UpdateAndDraw(d_disable_render_hud->GetBool());
- #else
- gfxHUD.UpdateAndDraw();
- #endif
- }
- return 1;
- }
- void HUDDisplay::chatResizeUp()
- {
- if(!Inited) return;
- gfxHUD.Invoke("_root.api.chatResizeUp", "");
- }
- void HUDDisplay::chatResizeDown()
- {
- if(!Inited) return;
- gfxHUD.Invoke("_root.api.chatResizeDown", "");
- }
- int isWeaponInfoVisible() const{return weaponInfoVisible;}
- void setChatVisibility(bool vis);
- void chatResizeUp();
- void chatResizeDown();
- public function handleScrollerUpDown(delta:Number)
- {
- if(delta < 0)
- {
- var startY = Scroller.Field.y;
- if(Scroller.Trigger.y > startY) {
- Scroller.Trigger.y += delta;
- if(Scroller.Trigger.y < startY)
- Scroller.Trigger.y = startY;
- }
- }
- else
- {
- var endY = Scroller.Field.height - Scroller.Trigger.height+25;
- if(Scroller.Trigger.y < endY) {
- Scroller.Trigger.y += delta;
- if(Scroller.Trigger.y > endY)
- Scroller.Trigger.y = endY;
- }
- }
- }
- public function chatResizeUp() : *
- {
- this.Main.Chat.y = this.Main.Chat.y - 40;
- this.Main.Chat.width = this.Main.Chat.width + 50;
- this.Main.Chat.height = this.Main.Chat.height + 40;
- }
- public function chatResizeDown() : *
- {
- this.Main.Chat.y = this.Main.Chat.y + 40;
- this.Main.Chat.width = this.Main.Chat.width - 50;
- this.Main.Chat.height = this.Main.Chat.height - 40;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement